ZeroSharp / XpoBatch

Fast batch operations for XPO

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fast batch modifications and deletions for DevExpress XPO

A set of extension methods which makes it easy to execute batch wide deletions and modifications with strong typing and using criteria. Note the operation bypasses all the business logic and locking. See the related blog posts for more information. Includes unit tests.

Fast deletions

using (UnitOfWork uow = new UnitOfWork())
{
    uow.Delete<MyObject>(CriteriaOperator.Parse("City != 'Chicago'"));
}

Fast modifications

using (UnitOfWork uow = new UnitOfWork())
{
	uow.Update<MyObject>(
        () => new MyObject(uow) 
                  { 
                     State = "CA", 
                     CostCenter = 123 
                  }, 
        CriteriaOperator.Parse("City == 'San Francisco'"));
}

Dependencies

Requires DevExpress XPO. This currently uses version 15.2.4, but it works with versions as old as 11.2 and possibly earlier with minor changes that are documented in the code.

Includes NUnit 2.6 NuGet package.

About

Fast batch operations for XPO

License:Other


Languages

Language:C# 100.0%