Junior EF Core

What is a concurrency token / [Timestamp] attribute?

A concurrency token is a property used to detect concurrency conflicts.

Example with [Timestamp]:

[Timestamp]

public byte[] RowVersion { get; set; }

  • EF Core includes this column in the WHERE clause of updates.
  • If the row has changed since it was loaded, EF will throw a

DbUpdateConcurrencyException.

Entity Framework Core – Relationships

More from Entity Framework Core Tutorial

All questions for this course