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
- Provides a DbContext property for discovering entity types and starting database queries and lookups.
- How deep it goes
- Works through property declaration, LINQ queries, and entity lookup; leaves detailed mapping customization to EF Core documentation.
- Examples
- Uses a Recipes property to filter recipe summaries, find a recipe by ID, and mark one as deleted.
- What you can do after
- Apply it via EF Core to declare an entity set, query it, and look up entities before saving changes through 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 representing a queryable data source whose expression trees can be translated and executed by a provider.
- Entity Framework Coreused by · Entity Framework Core is a cross-platform object-relational mapping framework for .NET that enables applications to query and persist data through .NET objects and APIs.
- database tableequivalent to · A database table is a relational database structure that organizes records into rows and 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.


