Reputation: 679
I'm using the Fluent API to define my db entity. Now I need to set the increment for my identity to a value that is not one.
I would like to have the SQL equivalent of my_id int IDENTITY(1,2)
.
The following code always generates an IDENTITY(1,1)
builder.HasKey(m => m.MyId);
builder.Property(m => m.MyId).ValueGeneratedOnAdd();
Upvotes: 0
Views: 111