Chapter 8 - Working with Databases Using Entity Framework Core
- Which .NET data provider would you use to work with Microsoft SQL Server 2012 Express Edition?
- .NET Core Data Provider for SQL Server.
- When defining a
DbContext
class, what type would you use for the property that represents a table, for example, theProducts
property?DbSet<T>
, whereT
is the entity type, for example,Product
.- For a
Products
property on another entity, for example,Category
, that represents a one-to-many relationship between entities, useICollection<T>
, whereT
is the related entity type.
- What is the EF convention for primary keys?
- The property named
ID
orClassNameID
is assumed to be the primary key. If the type of that property is any of the following, then the property ...
- The property named
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.