using Microsoft.EntityFrameworkCore; public sealed class LabDb : DbContext { public LabDb(DbContextOptions options) : base(options) { } public DbSet Items => Set(); protected override void OnModelCreating(ModelBuilder model) { model.Entity().Property(x => x.Version).IsConcurrencyToken(); } } public sealed class Item { public int Id { get; set; } public int Version { get; set; } public string Name { get; set; } = ""; }