[英]How to create rowversion field with using frame work migrations
How would I generate a rowversion field using entity framework migrations? 如何使用实体框架迁移生成Rowversion字段? 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);
Version = c.Binary(nullable: false, fixedLength: true, timestamp: true, storeType: "rowversion"),
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.