Practicing and exploring
Test your knowledge and understanding by answering some questions, get some hands-on practice, and explore this chapter's topics with deeper research.
Exercise 11.1 – Test your knowledge
Answer the following questions:
- What type would you use for the property that represents a table, for example, the
Products
property of a 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 anentity
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...