You're just starting with ASP.NET Core and Entity Framework. You've created your entity classes, but now you need a way to interact with the database. Which class should you create to manage this?

  • DbContext
  • DbSet
  • SqlConnection
  • EntityConnection
In Entity Framework Core, the DbContext class is responsible for managing database connections, tracking changes, and serving as the main entry point for interacting with the database. It provides a bridge between your entity classes and the underlying database, allowing you to perform operations like querying, inserting, updating, and deleting data.
Add your answer
Loading...

Leave a comment

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