Microsoft Exam Questions

which codesegment should you replace the body of the SaveChanges() method in the FlightInfoContext.c

Errors occasionally occur when saving data using the FlightlnfoContext ADO.NET Entity Framework context.
Updates to the data are being lost when an error occurs. You need to ensure that data is still saved when an
error occurs by retrying the operation. No more than five retries should be performed. With which codesegment
should you replace the body of the SaveChanges() method in the FlightInfoContext.cs file?

A.
Option A

B.
Option B

C.
Option C

D.
Option D

Explanation:
EntitySqlException : Represents errors that occur when parsing Entity SQL command text. This exceptionis
thrown when syntactic or semantic rules are violated.
SqlException : The exception that is thrown when SQL Server returns a warning or error. This class cannot be
inherited.
EntityCommandExecutionException : Represents errorsthat occur when the underlying storage provider could
not execute the specified command. This exception usually wraps a provider-specific exception.