Reputation: 2643
How would I generate a rowversion field using entity framework migrations? Here is a sample of what I am trying to achieve.
CreateTable(
companiesTable,
companies => new
{
Id = companies.Int(nullable: false, identity: true),
RowVersion = companies.????,
Name = companies.String(nullable: false, maxLength: 256),
Slug = companies.String(nullable: false, maxLength: 256)
})
.PrimaryKey(x => x.Id)
.Index(x => x.Slug, unique: true);
Upvotes: 0
Views: 290
Reputation: 2643
Version = c.Binary(nullable: false, fixedLength: true, timestamp: true, storeType: "rowversion"),
Upvotes: 0