Q1. What base class can be used to represent a table in a database inside the DbContext
collection's property?
List<T>
/List(of T)
DbSet<T>
/DbSet(of T)
ICollection<T>
/ICollection(of T)
Q2. You do not have to call Dispose
on DbContext
after use, true or false?
Q3. Which method can be used to locate a row in the database using the primary key in Entity Framework?
Q4. Which method of DbSet
can you use after finding a record to delete it?
Q5. You want to easily update the last name of a person in a record stored in the database. You can do so in Entity Framework by:
SaveChanges
DbSet
using the Add
method, and then calling SaveChanges
Q6. You have changed a class that is mapped to a table by adding another property to it. What happens if you set the database initializer to null and run the program?
3.145.179.225