Entity Framework Extensions - Column Expression

Column Expression Options

Column Input Expression

Gets or sets columns to map with direction Input.

Always include the key for operation required one.

Example

ctx.BulkMerge(parents, operation => 
        operation.ColumnInputExpression = entity => new {entity.ParentID, entity.ColumnInt}); 

Column Output Expression

Gets or sets columns to map with the direction output.

Example

ctx.BulkMerge(parents, operation => 
        operation.ColumnOutputExpression = entity => new {entity.ModifiedDate, entity.ModifiedUser}); 

Column Primary Key Expression

Gets or sets columns to map with the primary key option to true.

Example

ctx.BulkMerge(parents, operation => 
        operation.ColumnPrimaryKeyExpression = entity => new { entity.Name }); 

Ignore On Merge Insert Expression

Gets or sets columns to skip when the merge execute the insert part.

Example

ctx.BulkMerge(parents, operation => 
        operation.IgnoreOnMergeUpdateExpression = entity => new {entity.ModifiedDate, entity.ModifiedUser}); 

Ignore On Merge Update Expression

Gets or sets columns to skip when the merge execute the update part.

Example

ctx.BulkMerge(parents, operation => 
        operation.IgnoreOnMergeUpdateExpression = entity => new {entity.CreatedDate, entity.CreatedUser}); 

Column Synchronize Delete Key Subset Expression

Gets or sets the key used to delete only rows matching the key and not existing in the source.

Sorry for the name!

Example

ctx.BulkMerge(parents, operation => 
        operation.ColumnPrimaryKeyExpression = entity => new { entity.Name });