Last active
November 30, 2016 16:03
-
-
Save zzzprojects/db152af3f093e799200e2ee39bb14bae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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