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:

  1. Which .NET data provider would you use to work with Microsoft SQL Server 2012 Express Edition?
  2. When defining a DbContext class, what type would you use for the property that represents a table, for example, the Products property of a Category entity?
  3. What is the EF convention for primary keys?
  4. When would you use an annotation attribute in an entity class?
  5. 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.