1. Configure the route in the RouteConfig.cs file below the App_start folder.
2. The return type of the action in the controller is: Emptyresult, ActionResult, Contentresult, Httpstatuscoderesult, Jsonresult
3. _layout.cshtml This file is under shared folder, as all pages can be referenced simultaneously. There is a property called @renderbody. This property is similar to a placeholder. You can replace the interface of other pages here.
4. How to add an EF to ASP Net MVC:
After you open the Package Manager console, enter commands, Initial-migration update-migration, and so on, a migrations folder is created.
5. The DAL data Access layer accesses the tier.
This layer is mainly for the context class. This class is generally inherited from DbContext, which interacts most closely with the EF to specify the dbset of the data you want to get.
The seed method is called when the DB is generated primarily when the application is running. To tell EF to call the seed method, you need to add elements in the node: EntityFramework node in the Web. config file:
<EntityFramework> <contexts><context type= " ContosoUniversity.DAL.SchoolContext, contosouniversity "><Databaseinitializer type= "ContosoUniversity.DAL.SchoolInitializer, contosouniversity" /> </ Context > </ Contexts > <defaultconnectionfactorytype= "System.Data.Entity.Infrastructure.LocalDbConnectionFactory, entityframework"> <Parameters> <parametervalue= "v11.0" /> </Parameters> </defaultconnectionfactory> <providers> <providerInvariantName= "System.Data.SqlClient"type= "System.Data.Entity.SqlServer.SqlProviderServices, entityframework.sqlserver" /> </providers></EntityFramework>
6.Entity Framework Code First
It means that you create a DB application The first time you run the program. The program calls the initializers Seed method, which initializes some of the data to the DB while the DB is created.
Https://www.codeguru.com/csharp/article.php/c19233/Introduction-to-Entity-Framework-Code-First.htm
Https://www.codeguru.com/csharp/article.php/c19999/Understanding-Database-Initializers-in-Entity-Framework-Code-First.htm
7. Miniprofiler
Http://www.cnblogs.com/GuZhenYin/p/5408632.html
8.
ASP. NET MVC Architecture