title: How to use EF Core concurrency token created by ForNpgsqlUseXminAsConcurrencyToken
body: <p>I have found npgsql provider <a href="http://www.npgsql.org/efcore/misc.html#optimistic-concurrency-and-concurrency-tokens" rel="nofollow noreferrer">extension</a> to set up concurrency token for entity framework core entity, which should do something like this:</p>
  
  <pre><code>modelBuilder.Entity&lt;MyEntity&gt;(b =&gt;
  {
      b.Property&lt;uint&gt;("xmin")
          .HasColumnType("xid")
          .ValueGeneratedOnAddOrUpdate()
          .IsConcurrencyToken();
  });
  </code></pre>
  
  <p>If I understand it well, it creates shadow property on entity.</p>
  
  <p>How can I use this property to track concurrent updates (more users try to update the same entity) in ASP.NET Core, for example? Should I try to to map xmin column to normal property and put it to hidden input tag as it is showed in <a href="https://docs.microsoft.com/en-us/aspnet/core/data/ef-mvc/concurrency" rel="nofollow noreferrer">asp.net core documentation</a>? Or is there another way?</p>