Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
// Single Key
ctx.BulkUpdate(customers, operation => operation.ColumnPrimaryKeyExpression =
customer => customer.Code);
// Surrogate Key (with anonymous type)
ctx.BulkUpdate(customers, operation => operation.ColumnPrimaryKeyExpression =
customer => new { customer.Code1, customer.Code2, customer.Code3 });
ctx.BulkUpdate(customers, operation =>
{
operation.AllowDuplicateKeys = true;
operation.ColumnPrimaryKeyExpression = customer => customer.Code;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment