When you have a table column that is an Identity column, but not the Primary key. There needs to be a metadata ignore statement.
builder.Property(x => x.Id)
.HasColumnName(@"Id")
.HasColumnType("bigint")
.IsRequired()
.ValueGeneratedOnAdd()
.UseIdentityColumn();
builder.Property(x => x.Id)
.Metadata.SetAfterSaveBehavior(Microsoft.EntityFrameworkCore.Metadata.PropertySaveBehavior.Ignore);
The Metadata is needed to avoid saving exceptions, if the column is not in the primary key.
It would be nice to include this in a future release.