Technical Analysis of watch and clock Maintenance Management System (I) MVC Architecture Construction and Maintenance Management System mvc
Technical Analysis of watch and clock Maintenance Management System (I) MVC Architecture construction 1.1 New Project
Step 1: Open the VS2010 interface, click the file in the upper left corner, click New, and select a project
1.1 (figure 1)
Step 2: Click the website Web type, select ASP.net MVC3 Web application, enter the project name (solution name) in the name, and select the path to store the project, click OK.
1.1 (figure 2)
Step 3: select an empty project and click OK. Then the MVC project is created successfully.
1.1 (figure 3)
1.1 (Figure 4)
1.2 create controllers and views
Step 1: Right-click Controllers, click Add, select controller, enter the name of the created controller, and click OK. The controller is created.
1.2 (figure 5)
1.2 (figure 6)
Step 2: Select Add view in Controller
1.2 (Figure 7)
1.2 (figure 8)
1.2 (figure 9)
1.2 (figure 10)
1.3 Add the Models Layer
Step 1: Right-click Models, click Add, and select new item
1.3 (figure 11)
Step 2: select a data template, click ADO. NET object database model, and enter the object database name.
1.3 (Figure 12)
Step 3: Select generate from database and click Next
1.3 (Figure 13)
Step 4: Click Create connection, select the data source (SQL Service), log on to the server name, enter the account and password,
Select the name of the database to be connected, and click test. If the test is successful, click OK. In the wizard, select sensitive characters, enter the name, and click Next.
1.3 (Figure 14)
1.3 (figure 15)
Step 5: select all tables and click Finish.
1.3 (Figure 16)
1.3 (figure 17)