DbSet<T>
DbSet<T> is an Entity Framework Core type representing a queryable and persistable set of entities of type T within a database context.
Building Web APIs with ASP.NET Core
DbSet<T> is an Entity Framework Core type representing a set of entities of a specified type and providing query and database operations for that set.
- How it is used
- Exposes entity sets through ApplicationDbContext for querying and CRUD operations.
- How deep it goes
- Defines DbSet<T>, shows property declarations, and distinguishes tracked additions from database persistence without detailing its internals.
- Examples
- Uses board-game DbSet declarations, a year-filtered query, and a CSV import that adds related entities.
- What you can do after
- Apply it via Entity Framework Core to expose entity sets, query board games, and add imported entities before saving.
Read how Building Web APIs with ASP.NET Core explains DbSet<T> →
ASP.NET Core in Action, 3e
DbSet<T> is the Entity Framework Core API representing a set of entities of type T and exposing query and persistence operations.
- How it is used
- Uses DbSet properties as entry points for entity discovery, database queries, and entity lookup in a DbContext.
- How deep it goes
- Explains model discovery, LINQ query execution, FindAsync tracking behavior, and snapshot-based updates, while deferring mapping customization to documentation.
- Examples
- Shows a recipe context, a filtered projection to view models, and a soft-delete update.
- What you can do after
- Apply it via Entity Framework Core to query entities, find an entity by ID, and save changes through a DbContext.
.NET in Action, Second Edition
DbSet is an Entity Framework Core API type representing a queryable and persistable collection of entities in a database context.
- How it is used
- Represents entity collections that applications query and persist through a DbContext.
- How deep it goes
- Explains declaration, querying, saving, generated identifiers, and version-specific initialization warnings.
- Examples
- Uses a Book entity, an in-memory database, inserted catalog books, SaveChanges, and an ordered Books query.
- What you can do after
- Operate a DbSet<T> by declaring it on a DbContext, adding entities, saving changes, and querying results.
Related concepts
- IQueryablekind of · IQueryable is a .NET interface for representing queryable data sources whose query expressions can be composed and interpreted or executed by a query provider.
- Entity Framework Coreused by · Entity Framework Core is a cross-platform object-relational mapper for .NET that enables applications to work with databases through .NET objects and queries.
- database tableequivalent to · A database table is a relational data structure that organizes records into rows whose values correspond to defined columns.
- dbcontextpart of · DbContext is the Entity Framework Core class that coordinates database access, entity querying and change tracking, and persistence for an application’s data model.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


