In Entity Framework, what is the purpose of DbSet properties within a DbContext class?

  • Configure database migrations
  • Define database schema
  • Define entity classes
  • Represent database tables
DbSet properties within a DbContext class are used to represent database tables. They allow you to perform CRUD (Create, Read, Update, Delete) operations on the associated entity type. DbSet does not define the database schema or handle migrations; it is a way to interact with the data as if it were a collection of objects. Understanding this concept is crucial for working with Entity Framework.
Add your answer
Loading...

Leave a comment

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