You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have similar problem, there is an example
(like your example EFBatchOperation.For(db, db.Comments).Where(x => x.Text == "a").Update(x => x.Reads, x => x.Reads + 1);)
var value1 = 1
var value2 = 2
EFBatchOperation.For(db, db.Comments)
.Where(x => x.Reads == value1)
.Update(x => x.Reads, x => value2);
The variable name '@p__linq__0' has already been declared... is thrown
Note: If I have used constant instead of variables all is OK
But I would like to execute update Comments set Reads = @2 where Reads = @1
Thanks
Dusan
When ever I try to do a update by query, i get the following Exception message:
"The variable name '@p__linq__0' has already been declared. Variable names must be unique within a query batch or stored procedure."
The text was updated successfully, but these errors were encountered: