# DbContext and Entities

EF Core maps entity classes to tables, matching names by convention. A DbContext class lists a DbSet for each table and holds the connection. In ASP.NET Core, register it with AddDbContext and UseSqlServer, and controllers ask for it like any other service.

![Cheat sheet: DbContext and Entities](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/4ad4f94c45c441558be5b69d06fc5133.webp)

- Category: Entity Framework Core
- Level: Journeyman
- Tags: c-sharp, DbContext, DbSet, Entity (entity-framework), entity-framework, Navigation Property, Primary Key Convention
- Updated: November 3, 2026

Source: https://www.ask-codey.com/cheat-sheets/entity-framework-core-dbcontext-and-entities-cheat-sheet
