mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Add user test case
This commit is contained in:
parent
7585e5b77a
commit
be6d752dde
@ -33,7 +33,26 @@ namespace OrmTest
|
|||||||
.Where(it=>it.Order.Id==1)
|
.Where(it=>it.Order.Id==1)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
db.CodeFirst.InitTables<UnitPkadfa1>();
|
||||||
|
db.CodeFirst.InitTables<UnitPkadfa2>();
|
||||||
|
db.CodeFirst.InitTables<UnitPkadfa2>();
|
||||||
|
db.DbMaintenance.DropTable<UnitPkadfa2>();
|
||||||
}
|
}
|
||||||
|
[SugarTable("UnitPkadfa")]
|
||||||
|
public class UnitPkadfa1
|
||||||
|
{
|
||||||
|
public string Id { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
}
|
||||||
|
[SugarTable("UnitPkadfa")]
|
||||||
|
public class UnitPkadfa2
|
||||||
|
{
|
||||||
|
[SugarColumn(IsPrimaryKey =true)]
|
||||||
|
public string Id { get; set; }
|
||||||
|
[SugarColumn(IsPrimaryKey = true)]
|
||||||
|
public string Name { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
[SqlSugar.Tenant("OrderDb")]
|
[SqlSugar.Tenant("OrderDb")]
|
||||||
[SqlSugar.SugarTable("Order811")]
|
[SqlSugar.SugarTable("Order811")]
|
||||||
public class Order
|
public class Order
|
||||||
|
Loading…
Reference in New Issue
Block a user