MikaelEliasson / EntityFramework.Utilities

Provides extensions for EntityFramework that doesn't exist out of the box like delete and update by query and bulk inserts
443 stars 175 forks source link

update by query #124

Open odaikurd opened 6 years ago

odaikurd commented 6 years ago

Hello

there is a bug when using the following code:

EFBatchOperation.For(db, db.Accounts) .Where(x => x.AccountID == glEntry.AccountID) .Update(x => x.Balance, x => x.Balance + delta);

sql profiler: exec sp_executesql N'UPDATE [dbo].[Account] SET [Balance] = ([Balance] + @plinq0) WHERE [AccountID] = @plinq0',N'@plinq0 bigint,@plinq0 decimal(11,2)',@plinq0=10001,@plinq0=-100000000.00

seems the where parameter (@plinq0) is using same update parameter name (@plinq0)

RudeySH commented 5 years ago

I'm interested in fixing this issue, however I'm not the author of this project which seems to be dead.

I'm currently maintaining a fork of EFUtilities which already includes many fixes. Could you try and see if the bug you found is still present in my fork? If so, I recommend opening an issue there and I'll see what I can do.

https://github.com/RudeySH/EntityFramework.Utilities