1. When using DbContext or DbSet, the namespace that must be introduced is ()
ps: This is the code first mode under the EF framework. Use code to write database relationships in the model, and then use the context class and model class model to automatically build control Server, view, database
2. To design a member registration view, the type of view template should be used ()
ps:
①create insert
②delete delete (through the field)
③edit modify and update (through the field)
④details search (through the field)
⑤list is the index (no need to write the method name and parameters in the address , Traverse the entire table)
3. Among the following methods or properties, which are not defined by the abstract class WebViewPage is (SaveChanges)
4. When designing the membership information modification page, you must use the method UpdateModel provided by the class (Controller) to save the model records in the controller action
! ! ! 5. Among the following methods, what is not defined by the class DbSet is ()
6. If the primary key of the model class is not a self-incrementing int type ID, the application uses the () annotation
7. Define methods in the controller to process the submission of the view form, and apply Use () annotation
8. Which of the following is not the working method of EF ()
9. The following description of Entity Framework is incorrect is ()
10. When the data model changes, you can use data migration to update the database. Which of the following is not a command used for data migration ()
ps:
These three are used for data migration , note that the last one is to update the database (database)
11. When creating a new MVC project, the EF framework ps is automatically introduced
: you need to download the reference by yourself
12. The Entity EF framework can only be used in Web projects (wrong)
13. The class DbContexct and DbSet are in the same namespace and
are both System.Data.Entity;
14. To create a WEB project with database access, you must first create the database
ps:ef code first method is to use code to automatically generate the database and view
! ! ! 15. When using the view template Create or Edit to design a view, Lambda will be used by default
16. View templates cannot be used for partial views. (Yes right)
17. In the .NET MVC project, each model object is mapped to a relationship (referring to a database table)
ps: each model is a table
18. The EF framework uses ID or id as the model primary key by default.
19. To build a model in the EF framework, there must be a primary key . The primary key can be specified by Key (it is correct ).
20. For the safety of website data, it needs to be submitted to the user Data validation