mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-24 18:04:52 +08:00
Add unit test
This commit is contained in:
parent
593708fcff
commit
f8ea52a9f0
@ -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>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user