public static void SetTransactionLevel(this DbContext dbContext, IsolationLevel isolationLevel)
{
Argument.IsNotNull("dbContext", dbContext);
Log.Info("Setting transaction isolation level to '{0}' for DbContext '{1}'", isolationLevel, ObjectToStringHelper.ToFullTypeString(dbContext));
var sqlCommand = IsolationHelper.TranslateTransactionLevelToSql(isolationLevel);
var objectContext = dbContext.GetObjectContext();
objectContext.ExecuteStoreCommand(sqlCommand);
}
}