Test your knowledge and understanding by answering some questions, get some hands-on practice, and explore this chapter's topics with deeper research.
Answer the following questions:
- What type would you use for the property that represents a table, for example, the
Products
property of aNorthwind
database context? - What type would you use for the property that represents a one-to-many relationship, for example, the
Products
property of aCategory
entity? - What is the EF Core convention for primary keys?
- When would you use an annotation attribute in an entity class?
- Why might you choose the Fluent API in preference to annotation attributes?
- What does a transaction isolation level of
Serializable
mean? - What does the
DbContext.SaveChanges()
method return? - What is the difference between eager loading and explicit loading?
- How should you define an EF Core entity class to match the following table?
CREATE TABLE Employees( EmpID INT IDENTITY...