EntityFramework 4.1 Extensions for batch Delete and Update

A great library that extends the functionality of EF. It provides the features to do batch updates, delete and future queries and audit log.

PM> Install-Package EntityFramework.Extended

Use the Package Manager Console in VS2010 to install it. And you can find the source in Github.



Make sure you import the Extensions namespace. Then you will see the extension methods of batch delete/update. Here are a few lines of code to demonstrate how to delete, update.

using EntityFramework.Extensions;

context.Users.Delete(u => u.FirstName == "firstname");

    t => t.StatusId == 1, 
    t => new Task {StatusId = 2});

For future query usage, you can use an IQueryable as the filter for the update

var users = context.Users
   .Where(u => u.FirstName == "firstname");

   u => new User {FirstName = "newfirstname"})

Pretty cool is it! To read more documentations go to the github site. https://github.com/loresoft/EntityFramework.Extended

2 thoughts on “EntityFramework 4.1 Extensions for batch Delete and Update

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s