title: EF core 3.0 Identity column and ValueConverter
body: <p>This my entity:</p>
  
  <pre><code>public class Audit
  {
      public string Pk { get; set; }
      public string TableName { get; set; }
      public string RowPk { get; set; }
      public string ActionType { get; set; }
      public string RowContent { get; set; }
  }
  </code></pre>
  
  <p>This my mapping:</p>
  
  <pre><code>modelBuilder.Entity&lt;Audit&gt;(entity =&gt;
  {
      entity.HasKey(e =&gt; e.Pk).IsClustered(true);
      entity.Property(e =&gt; e.Pk)
      .ValueGeneratedOnAdd()
      .UseIdentityColumn()
      .HasConversion(new ValueConverter&lt;string, long&gt;(v =&gt; Convert.ToInt64(v),v =&gt; Convert.ToString(v)));
  
      entity.Property(e =&gt; e.TableName).IsRequired().HasMaxLength(255);
      entity.Property(e =&gt; e.RowPk).IsRequired().HasMaxLength(100);
      entity.Property(e =&gt; e.ActionType).IsRequired().HasMaxLength(1);
      entity.Property(e =&gt; e.RowContent).IsRequired;
  });
  </code></pre>
  
  <p>My requirements:</p>
  
  <p>Audit.Pk: <code>string</code><br>
  Pk column: <code>BigInt</code> and <code>AutoIncrement</code></p>
  
  <p>Adding the migration I get the following error:</p>
  
  <blockquote>
    <p>Identity value generation cannot be used for the property 'Pk' on
    entity type 'Audit' because the property type is 'string'. Identity
    value generation can only be used with signed integer properties.</p>
  </blockquote>
  
  <p>Any workaround?</p>