ASP. NET MVC 5 crud Code Auto-generation tool-vs.net saffolding feature extension

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.