I Love Stackoverflow
I Love Stackoverflow

Reputation: 6868

How to generate whole boiler plate code for CRUD operations like visual studio using code?

I am trying to generate CRUD operations for entities of my database tables like with respective endpoints to consume.

It is same as the visual studio generates boiler plate code for Authentication(Account controller),and also crud operation in the form of whole package.

I have came across t4 templates but not getting how to use it to generate crud operations for my database table entities.

I am also trying to generate whole application package with Application name,references(dll),Controller etc.. like how visual studio is generating boiler plate code for CRUD operations for entity framework.

I will pass sql server name,database name,tables for which i want to generate CRUD operations.

I want to generate this on demand with my console application so it should return whole application packages with reference s(all dll) so then i will create zip of that packages and return to user.

For Eg:I want to generate my whole apllication package based on "Application name" as shown in below WebApplication3 project which contains References,Controller which contains crud operations enter image description here

Can anybody tell me how to do this?

Upvotes: 3

Views: 3759

Answers (1)

T. Romuald
T. Romuald

Reputation: 91

You could use a generator like Telosys, it has a C# MVC Template working with entity framework.

If you have a database model, you can pass it to the generator with this template and it will generate a working CRUD application written in C# that you can reuse in your project.

http://telosys.org/

Template to use : https://github.com/telosys-templates-v3/telosys-template-mvc-csharp

Upvotes: 6

Related Questions