DbContext
DbContext is a primary class in Entity Framework (EF) that represents a session with a database and provides the API used to query and save instances of entity classes. In EF Core, applications define a derived class from DbContext with a set of properties of type DbSet<TEntity> that expose the entities you want to query or save.
The context tracks changes to retrieved entities via a change tracker, enabling updates, inserts, and deletes
Contexts are configured with DbContextOptions, which specify the database provider, connection string, and other behaviors. A
DbSet properties map to tables; LINQ queries are translated to SQL. EF Core supports features such as
As a gateway to data, DbContext is the unit of work and uses DbSet to perform CRUD