I want to do this query to bypass concurrency conflicts on Balance
column.
Update SomeTable
set Balance = Balance + 500
where Id = someId
I know one solution is to use DbContext.Database.ExecuteSqlCommand()
and another solution is to use Optimistic Concurrency Check
.
Is there any way to do the query using EF Core (nor ExecuteSqlCommand
neither optimistic concurrency check
)?