Q1. Although there is no first class support for views in Entity Framework, we can always retrieve data from a view using the SqlQuery
method.
Q2. The SqlQuery
method can be used to call an arbitrary SQL statement, including calling stored procedures or functions. Entity Framework will materialize the results based on the generic type provided to this method.
Q3. This is not correct. Insert, update, and delete operations can be automatically generated by Entity Framework. All we need to do is map an entity to stored procedures inside an entity type configuration class.
Q4. This is not correct. Arbitrary use of the asynchronous API can result in performance overhead.
Q5. SaveChangesAsync
is the method on DbContext
that can be called to flush changes to the database asynchronously.
Q6. IsRowVersion
is the only method called that needs to be made on the property configuration class to mark a property as concurrency check property.
Q7. DbUpdateConcurrencyException
is the correct type to catch from Entity Framework Code-First to handle concurrency errors.