Skip to main content
InterviewHubPRO
Section Overview
Q23

Question 23 of 50

Part 2: Entity Framework Core, Security & High-Performance Data (11 - 24)

46%
ASP.NET Core & Web API (50 Qs)•Part 2: Entity Framework Core, Security & High-Performance Data (11 - 24)

What is the difference between Optimistic Concurrency and RowVersion in EF Core?

senior LevelFormsPerformanceSecurity & Auth

In Simple Words:

  • Uses a [Timestamp] or IsRowVersion() byte array column.
  • SQL Server automatically increments the RowVersion binary on every update.
  • EF Core adds WHERE RowVersion = @originalVersion. If another transaction modified the row, a DbUpdateConcurrencyException is thrown.