6

The library Entity.Framework.Extensions (paid) has a method for doing entity updates:

context.Customers
.Where(c=>c.XXX = "")
.UpdateFromQuery(c=>new Customer{ Timestamp = DateTime.UtcNow })

The library Entity.Framework.Plus (free) has a similar method for doing entity updates:

context.Customers
.Where(c=>c.XXX = "")
.Update(c=> new Customer{ Timestamp = DateTime.UtcNow })

What is the difference between these two implementations?

Jonathan Magnan
  • 10,874
  • 2
  • 38
  • 60
Freddy
  • 329
  • 1
  • 4
  • 10

1 Answers1

2

There is a slight difference between both libraries for SQL Server due to how they have been implemented. However, they should support all the same scenarios.

For other providers, the same base code is used.

At one point in the future, we plan to only keep this feature Batch Delete and Batch Update in only one of our libraries.

If we choose to keep it under Entity Framework Extensions, we will make sure this feature will be available for free

Jonathan Magnan
  • 10,874
  • 2
  • 38
  • 60
  • 1
    Since we pay for EF Extensions and also use EF Plus, should I prefer one over the other (we use SQL server)? Is the one in EF Extensions "better" in any way? I do prefer the one provided with EF Plus since it returns the number of rows affected and the other don't. – Freddy Sep 24 '17 at 10:44
  • I recommend you also to take the EF Plus one. The implementation is better. – Jonathan Magnan Sep 24 '17 at 12:08