abp ef codefirst 设置默认值
public partial class tableIsWaringfiled : DbMigration { public override void Up() {
//设置默认值为true AddColumn("dbo.BizMaterial", "IsWarning", c => c.Boolean(nullable: false,defaultValue:true)); AddColumn("dbo.BizMedicine", "IsWarning", c => c.Boolean(nullable: false, defaultValue: true)); } public override void Down() { DropColumn("dbo.BizMedicine", "IsWarning"); DropColumn("dbo.BizMaterial", "IsWarning"); } }