Skip to content

Releases: zzzprojects/EntityFramework-Extensions

v3.12.10

02 Jul 13:26

Choose a tag to compare

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

29 Jun 16:56

Choose a tag to compare

Download the library here

PRO Version unlocked for the current month (July)

v3.12.8

28 Jun 14:41

Choose a tag to compare

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

28 Jun 14:10

Choose a tag to compare

Download the library here

FIXED: Bulk Operations when types are added dynamically to the context in a concurrent scenario.
ADDED: RefreshModel

ctx.RefreshModel();

PRO Version unlocked for the current month (June)

v3.12.6

27 Jun 18:45

Choose a tag to compare

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

22 Jun 01:35

Choose a tag to compare

Download the library here

FIXED: BulkMerge was incompatible with TPT

PRO Version unlocked for the current month (June)

v3.12.4

08 Jun 15:17

Choose a tag to compare

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

07 Jun 19:54

Choose a tag to compare

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

31 May 14:45

Choose a tag to compare

Download the library here

MOVED: Code has been migrated to VS2015 with Shared Project.

PRO Version unlocked for the current month (June)

v3.11.24

27 May 12:37

Choose a tag to compare

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)