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
place holder example |
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
// DON'T add the key if auto-generated | |
ctx.BulkInsert(customers, operation => operation.ColumnInputExpression = | |
customer => new {customer.Name, customer.Email}); | |
// ALWAYS add the key | |
ctx.BulkUpdate(customers, operation => operation.ColumnInputExpression = | |
customer => new { customer.ID, customer.Name, customer.Email }); | |
// ALWAYS add the key | |
ctx.BulkMerge(customers, operation => operation.ColumnInputExpression = |
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
EntityFrameworkManager.DefaultEntityFrameworkPropagationValue = false; |
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
public Benchmark() | |
{ | |
// BENCHMARK using Stopwatch | |
var clock1 = new Stopwatch(); | |
var clock2 = new Stopwatch(); | |
var nbRecord = 1000; | |
var nbTry = 5; | |
var list = GenerateData(nbRecord); |
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
place holder example |
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
place holder example |
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
place holder example |
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
place holder example |
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
place holder example |
NewerOlder