Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
StringBuilder logger = new StringBuilder();
using (var ctx = new EntitiesContext())
{
ctx.BulkSaveChanges(operation =>
{
operation.Log += s => logger.AppendLine(s);
});
}
StringBuilder logDump;
using (var ctx = new EntitiesContext())
{
ctx.BulkSaveChanges(operation =>
{
operation.UseLogDump = true;
operation.BulkOperationExecuting = bulkOperation => logDump = bulkOperation.LogDump;
});
}
StringBuilder logDump;
using (var ctx = new EntitiesContext())
{
ctx.BulkSaveChanges(operation =>
{
operation.UseLogDump = true;
operation.BulkOperationExecuting = bulkOperation => logDump = bulkOperation.LogDump;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment