In Entity Framework, what is a DbContext?

  • A class that defines the structure of entities in an application.
  • A component responsible for establishing a connection to the database.
  • A lightweight representation of a database context.
  • An interface for querying and saving data in the database.
In Entity Framework, a DbContext is a lightweight representation of a database context. It represents a session with the database, allowing developers to query and save data. DbContext is part of the Entity Framework Core and provides a high-level abstraction for interacting with the database.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *