title: TimeStamp / Rowversion column with EF Core
body: <p>I am trying to figure out how I should add a <code>Timestamp</code>/<code>rowversion</code> column to data tables in SQL Server via Entity Framework code first.</p>
  
  <p>This is using EF Core V2.0.</p>
  
  <p>I have tried two approaches to achieve this, the first:</p>
  
  <pre><code>public class Contact
  {
      public int ContactId { get; set; }
      public string ContactName { get; set; }
      public string CompanyName { get; set; }
      public string FirstName { get; set; }
      public string LastName { get; set; }
      [Timestamp]
      public byte[] RowVersion { get; set; }
  }
  </code></pre>
  
  <p>The second via the fluent API:</p>
  
  <pre><code>protected override void OnModelCreating(ModelBuilder modelBuilder)
  {
      foreach (var entityType in modelBuilder.Model.GetEntityTypes())
      {
          modelBuilder.Entity(entityType.Name).Property&lt;DateTime&gt;("Inserted");
          modelBuilder.Entity(entityType.Name).Property&lt;DateTime&gt;("LastModified");
          modelBuilder.Entity(entityType.Name).Property&lt;byte[]&gt;  ("RowVersion");
      }
  }
  </code></pre>
  
  <p>In both cases after I run <code>Add-Migration</code>, I get the following:</p>
  
  <pre><code>protected override void Up(MigrationBuilder migrationBuilder)
  {
      migrationBuilder.CreateTable(
          name: "Contacts",
          columns: table =&gt; new
          {
              ContactId    = table.Column&lt;int&gt;(type: "int", nullable: false)
                  .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
              CompanyName  = table.Column&lt;string&gt;  (type: "nvarchar(max)", nullable: true),
              ContactName  = table.Column&lt;string&gt;  (type: "nvarchar(max)", nullable: true),
              FirstName    = table.Column&lt;string&gt;  (type: "nvarchar(max)", nullable: true),
              Inserted     = table.Column&lt;DateTime&gt;(type: "datetime2", nullable: false),
              LastModified = table.Column&lt;DateTime&gt;(type: "datetime2", nullable: false),
              LastName     = table.Column&lt;string&gt;  (type: "nvarchar(max)", nullable: true),
              RowVersion   = table.Column&lt;byte[]&gt;  (type: "varbinary(max)", nullable: true)
          },
          constraints: table =&gt;
          {
              table.PrimaryKey("PK_Contacts", x =&gt; x.ContactId);
          }
      );
  }
  </code></pre>
  
  <p>I would have expected the <code>RowVersion</code> column to be of type <code>timestamp</code> and for its <code>nullable</code> property to be <code>false</code>.  Is this a limitation of EF Core or am I trying to do this incorrectly?</p>