Z.Entity Framework Extensions 3.9.40 » Developer.Team

Z.Entity Framework Extensions 3.9.40

Z.Entity Framework Extensions 3.9.40
Z.Entity Framework Extensions 3.9.40 | 510 kB


Use scalable bulk operations and always get the best performance available for your database provider.

SQL Server 2008+
SQL Azure
SQL Compact
MySQL
SQLite
PostgreSQL
Oracle (Coming soon)

Bulk SaveChanges

Improving your applications performance couldn’t have been made easier!

Easy to use
Easy to customize
Easy to maintain

// Easy to use
context.BulkSaveChanges();

// Easy to customize
context.BulkSaveChanges(operation => operation.BatchSize = 1000);


Bulk Operations

Use flexible features to overcome Entity Framework limitations

Choose batch size
Choose columns
Choose primary key

// Use all kind of bulk operations
context.BulkInsert(customers);
context.BulkUpdate(customers);
context.BulkDelete(customers);

// Customize your operation
context.BulkMerge(customers, operation => {
   operation.BatchSize = 1000;
   operation.ColumnPrimaryKeyExpression = customer => customer.Code;
});


Bulk from LINQ Query

Perform bulk operations from LINQ Query without loading entities in the context.

DeleteFromQuery
UpdateFromQuery

// DELETE all customers that are inactive for more than 2 years
context.Customers
    .Where(x => x.LastLogin < DateTime.Now.AddYears(-2))
    .DeleteFromQuery(operation => operation.BatchSize = 10000);
 
// UPDATE all customers that are inactive for more than 2 years
context.Customers
    .Where(x => x.Actif && x.LastLogin < DateTime.Now.AddYears(-2))
    .UpdateFromQuery(x => new Customer {Actif = false});


[/b]

[b] Only for V.I.P
Warning! You are not allowed to view this text.
SiteLock