Gbase8S CodeFirst.InitTables的问题 返回

SqlSugar 待处理
152
该叫什么 Miracle 发布于1周前
悬赏:5 飞吻

版本:SqlSugar.GBaseCore (5.1.4.222)

sqlSugarCore 5.1.4.215


重现代码

  public void GetZlb7(string a)

  {


      var db = DbManger.Db;

      var typeBilder = db.DynamicBuilder().CreateClass("aaaa", new SugarTable() { TableDescription = "测试" });

      typeBilder.CreateProperty("Id", typeof(Guid), new SugarColumn() { IsPrimaryKey = true, ColumnDescription = "主键", Length = 36 });

      if(a=="1")

      {

          typeBilder.CreateProperty("Creator", typeof(string), new SugarColumn() { Length = 100, ColumnDescription = "创建人", IsNullable = true });

      }

      var type = typeBilder.BuilderType();

      db.CodeFirst.InitTables(type);

 return;

  }

依次调用

GetZlb7()和GetZlb7(1) 来表示 创建表 和 修改表  加字段的操作  GetZlb7()无报错,然后GetZlb7(1) 报如下错误

image.png

        


热忱回答0