How can i transform this sql query to an EF linq command
"update dbo.table set col1= col1 + 1 where Id = 27"
i want to execute this query using one command to avoid concurrency problems in case of another client modify the record in the same time
i'm looking for doing that using EF but in one command
i tried this but i'm looking for a better solution :
context.table1.FromSqlInterpolated($"update dbo.table set col1= col1+ 1 where Id=27").FirstOrDefaultAsync();