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 8.1 - test your knowledge
Answer the following questions:
- Which .NET data provider would you use to work with Microsoft SQL Server 2012 Express Edition?
- When defining a
DbContext
class, what type would you use for the property that represents a table, for example, theProducts
property of aCategory
entity? - What is the EF 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?
Exercise 8.2 - explore the EF Core documentation
Go to the following website and read ...
Get C# 7 and .NET Core: Modern Cross-Platform Development - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.