Releases: zzzprojects/EntityFramework-Extensions
v3.12.10
Download the library here
ADDED: AutoTruncate option. This option allow to truncate for SQL Server automatically char, nchar, varchar, nvarchar type using max length from the database.
Example
ctx.BulkSaveChanges(option => option.AutoTruncate = true);
ctx.BulkInsert(list, operation => operation.AutoTruncate = true);PRO Version unlocked for the current month (July)
v3.12.9
v3.12.8
Download the library here
MOVED: EntityFrameworkManager is now under Z.EntityFramework.Extensions namespace instead of Z.BulkOperations
ADDED: EntityFrameworkManager.ForceTriggerResolution option. This option can be useful when you have a job that create && remove trigger on table from time to time.
PRO Version unlocked for the current month (June)
v3.12.7
v3.12.6
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)
v3.12.5
v3.12.4
Download the library here
ADDED: MergeMatchedAndOneNotConditionExpression options for SQL Server.
By example, when specifying one or many columns that at least one value must be different:
ctx.BulkMerge(list, operation =>
operation.MergeMatchedAndOneNotConditionExpression = entity =>
new {entity.ColumnFakeKey1, entity.ColumnFakeKey2});The MATCHED part is modified to ADD the condition expression specified.
WHEN MATCHED AND ( ( ( DestinationTable.[ColumnFakeKey1] IS NULL
AND StagingTable.[ColumnFakeKey1] IS NOT NULL
)
OR ( DestinationTable.[ColumnFakeKey1] IS NOT NULL
AND StagingTable.[ColumnFakeKey1] IS NULL
)
OR DestinationTable.[ColumnFakeKey1] <> StagingTable.[ColumnFakeKey1]
)
OR ( ( DestinationTable.[ColumnFakeKey2] IS NULL
AND StagingTable.[ColumnFakeKey2] IS NOT NULL
)
OR ( DestinationTable.[ColumnFakeKey2] IS NOT NULL
AND StagingTable.[ColumnFakeKey2] IS NULL
)
OR DestinationTable.[ColumnFakeKey2] <> StagingTable.[ColumnFakeKey2]
)
) THEN
PRO Version unlocked for the current month (June)
v3.12.2
Download the library here
ADDED: MergeMatchedAndConditionExpression options for SQL Server.
By example, when specifying one or multiple key to add in the condition
ctx.BulkMerge(list, operation =>
operation.MergeMatchedAndConditionExpression = entity =>
new {entity.ColumnFakeKey1, entity.ColumnFakeKey2});The MATCHED part is modified to ADD the condition expression specified.
WHEN MATCHED AND DestinationTable.[ColumnFakeKey1] = StagingTable.[ColumnFakeKey1] AND DestinationTable.[ColumnFakeKey2] = StagingTable.[ColumnFakeKey2] THEN
UPDATE
SET [ColumnFakeKey1] = StagingTable.[ColumnFakeKey1], [ColumnFakeKey2] = StagingTable.[ColumnFakeKey2], [ColumnInt] = StagingTable.[ColumnInt]
PRO Version unlocked for the current month (June)
v3.12.0
v3.11.24
Download the library here
FIXED: Oracle with a primary key of type long. This issue happens because Oracle store the value as a number(10, 0) and return it as Decimal, so a conversion is required.
Example:
public abstract class DATA_Z1
{
public long ID { get; set; }
}PRO Version unlocked for the current month (May)