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"); } }

 

相关文章:

  • 2022-12-23
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-11
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-10
  • 2021-10-17
  • 2022-02-17
  • 2022-12-23
相关资源
相似解决方案