Skip to content

ZeroSharp/XpoBatch

Repository files navigation

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.

Releases

No releases published

Packages

No packages published

Languages