Add unit test

This commit is contained in:
sunkaixuan 2023-03-20 20:31:06 +08:00
parent 593708fcff
commit f8ea52a9f0

View File

@ -126,6 +126,19 @@ namespace OrmTest
{
throw new Exception("unit error");
}
var type = db.DynamicBuilder().CreateClass("UnitEntityA",
new SugarTable()
{
TableDescription = "表备注",
//DisabledUpdateAll=true 可以禁止更新只创建
}
)
.CreateProperty("Id", typeof(int), new SugarColumn() { IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "列备注" })
.CreateProperty("Name", typeof(string), new SugarColumn() {Length=200, ColumnDescription = "列备注" })
.BuilderType();
db.CodeFirst.InitTables(type);
}
/// <summary>