Skip to content

v3.12.6

Choose a tag to compare

@JonathanMagnan JonathanMagnan released this 27 Jun 18:45
· 889 commits to master since this release

Download the library here

IMPROVED: IncludeGraph Options for BulkInsert, BulkUpdate, and BulkMerge

Example of Use

ctx.BulkMerge(parents, operation =>
{
	operation.IncludeGraph = true;
	operation.IncludeGraphOperationBuilder = (o) =>
	{
		((BulkOperation) o).BatchSize = 100;
		if (o is BulkOperation<Parent>)
		{
			var bulk = (BulkOperation<Parent>) o;
			bulk.ColumnPrimaryKeyExpression = parent => parent.Name;
		}
		else if (o is BulkOperation<Child>)
		{
			var bulk = (BulkOperation<Child>)o;
			bulk.IgnoreOnMergeInsertExpression = child => new { child.Name1, child.Name2 };
			bulk.IgnoreOnMergeUpdateExpression = child => new { child.Name3, child.Name4 };
		}
	};
});

PRO Version unlocked for the current month (June)