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)