mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-11-09 10:55:02 +08:00
Update Demo
This commit is contained in:
@@ -22,7 +22,6 @@ namespace OrmTest
|
|||||||
public void Test()
|
public void Test()
|
||||||
{
|
{
|
||||||
base.db.BeginTran();
|
base.db.BeginTran();
|
||||||
|
|
||||||
base.GetList(); //调用内部仓储方法
|
base.GetList(); //调用内部仓储方法
|
||||||
base.ChangeRepository<Repository<C2Table>>().GetList();//调用外部仓储
|
base.ChangeRepository<Repository<C2Table>>().GetList();//调用外部仓储
|
||||||
|
|
||||||
@@ -58,6 +57,7 @@ namespace OrmTest
|
|||||||
var configId = typeof(T).GetCustomAttribute<TenantAttribute>().configId;
|
var configId = typeof(T).GetCustomAttribute<TenantAttribute>().configId;
|
||||||
Context = db.GetConnection(configId);
|
Context = db.GetConnection(configId);
|
||||||
this.db = db;
|
this.db = db;
|
||||||
|
this.db.CodeFirst.InitTables<T>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user