Praznje marnje.

petek, maj 24, 2019

Concurrency Conflicts in the Entity Framework

_context.Entry(tableToUpdate).Property("RowVersion").OriginalValue = rowVersion;

Then when the Entity Framework creates a SQL UPDATE command, that command will include a WHERE clause that looks for a row that has the original RowVersion value.
If no rows are affected by the UPDATE command (no rows have the original RowVersion value), the Entity Framework throws a DbUpdateConcurrencyException exception.


Ni komentarjev: