如何使用实体框架迁移生成rowversion字段? 以下是我想要实现的一个示例。
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);
答案 0 :(得分:0)
Version = c.Binary(nullable: false, fixedLength: true, timestamp: true, storeType: "rowversion"),