ASP. NET MVC 5 crud Code Auto-generation tool-visual studio.net2013 saffolding feature extension
Last time I did anASP. WebForm Scaffolding combined Generic Unit of Work & (extensible) repositories Framework Code Generation Wizard
is to survive Web form.
This time I saw the code that generated the MVC saffolding extension original author on-line Https://github.com/robinli/MVC5-Scaffolder
I have integrated the Generic Unit of work & (extensible) repositories Frameworkon his basis and added paging and querying capabilities.
Development environment
Generic Unit of Work & (extensible) repositories Framework HTTP// genericunitofworkandrepositories.codeplex.com/releases/view/113204
Happy.Scaffolding.MVC5.vsix (source code (Https://github.com/neozhu/MVC5-Scaffolder) If you feel good please Like:)
Unity
Unity Bootstrapper for ASP.
Demo program Http://files.cnblogs.com/files/neozhu/mvcscaffoldingDemo.zip
Project structure
New Entities and DbContext
Category,product the entity objects that you define yourself
Categorymetadata and Productmetadata are generated through wizards primarily for validation and display
Create a new controller
To create a property of the metadata class
The tool will automatically generate the following files
Controller
----CategoriesController.cs
Repositories
---CategoryRepository.cs
Services
---ICategoryService.cs
---CategoryService.cs
View
---Categories
-----insert.cshtml
-----edit.cshtml
-----editform.cshtml
-----create.cshtml
See demo program for specific code
Registration Services
Modify UnityConfig.cs
Register the required repository and service in
Run debugging
Query page
Edit Page
Remove Features
New page, if there is a foreign key association will automatically generate select Select
Subsequent improvements
New changes by popup, single page using AJAX form submission to do local refresh
Added one-to-many modifications and new pages
Use more AJAX features
ASP. NET MVC 5 crud Code Auto-generation tool-vs.net saffolding feature extension