mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 13:06:50 +08:00
Add user test case
This commit is contained in:
parent
7585e5b77a
commit
be6d752dde
@ -32,8 +32,27 @@ namespace OrmTest
|
|||||||
.Includes(it=>it.Order)
|
.Includes(it=>it.Order)
|
||||||
.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