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?
Find
Locate
Define
Q4. Which method of DbSet
can you use after finding a record to delete it?
Delete
Remove
Erase
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:
Issuing a SQL command
Getting the corresponding object, setting the LastName property, and calling
SaveChanges
Creating an instance with the same id and different values for LastName, then adding it to
DbSet
using theAdd
method, and then callingSaveChanges
Q6. You have changed a class that is mapped to a table by adding another property to it. What happens if you...