0

如何使用实体框架迁移生成 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);
4

1 回答 1

0
Version = c.Binary(nullable: false, fixedLength: true, timestamp: true, storeType: "rowversion"),
于 2014-06-17T06:57:37.293 回答