MVC Controller C Perfect separation (with scaffolding assist)

Source: Internet
Author: User

MVC Controller C Perfect separation (with scaffolding assist)

1.

The first step: Build a Web project and Controllers class library, reference the necessary DLLs, then generate, then go to find his directory, locate the. csproj suffix file, and then locate the. csproj file in the Web project.

Next, open the. csproj file below the Web to locate the Projecttypeguids node, copy the entire node to the corresponding location in the. csproj file below the class library, which protects the three GUID type encoding, removes the middle one and saves it. This means you can use the scaffolding function.

2.

Then right-click the Web project reference controllers this class library, then you can use scaffolding on these two projects, a controller, a put view (views), the area can also be added

MVC Controller C Perfect separation (with scaffolding assist)

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.