mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-18 05:59:34 +08:00
Synchronization code
This commit is contained in:
parent
f137a4ade1
commit
a69b8c0026
@ -12,7 +12,7 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
public class SqlSugarScopeProvider:ISqlSugarClient
|
public class SqlSugarScopeProvider:ISqlSugarClient
|
||||||
{
|
{
|
||||||
private SqlSugarProvider conn;
|
internal SqlSugarProvider conn;
|
||||||
|
|
||||||
public SqlSugarScopeProvider(SqlSugarProvider conn)
|
public SqlSugarScopeProvider(SqlSugarProvider conn)
|
||||||
{
|
{
|
||||||
|
@ -11,8 +11,23 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
//this.context = context;
|
//this.context = context;
|
||||||
this.sqlBuilder = InstanceFactory.GetSqlbuilder(context.CurrentConnectionConfig);
|
this.sqlBuilder = InstanceFactory.GetSqlbuilder(context.CurrentConnectionConfig);
|
||||||
|
if (context is SqlSugarProvider)
|
||||||
|
{
|
||||||
|
this.sqlBuilder.Context = context as SqlSugarProvider;
|
||||||
|
}
|
||||||
|
else if (context is SqlSugarScopeProvider)
|
||||||
|
{
|
||||||
|
this.sqlBuilder.Context = (context as SqlSugarScopeProvider).conn;
|
||||||
|
}
|
||||||
|
else if(context is SqlSugarScope)
|
||||||
|
{
|
||||||
|
this.sqlBuilder.Context = (context as SqlSugarScope).GetConnection(context.CurrentConnectionConfig.ConfigId);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
this.sqlBuilder.Context = (context as SqlSugarClient).Context;
|
this.sqlBuilder.Context = (context as SqlSugarClient).Context;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//public ISqlSugarClient context { get; set; }
|
//public ISqlSugarClient context { get; set; }
|
||||||
public ISqlBuilder sqlBuilder { get; set; }
|
public ISqlBuilder sqlBuilder { get; set; }
|
||||||
public JsonTableNameInfo GetTableName(JToken item)
|
public JsonTableNameInfo GetTableName(JToken item)
|
||||||
|
Loading…
Reference in New Issue
Block a user