Browse Source

Synchronization code

SqlSugar5
sunkaixuan 2 years ago
parent
commit
98d6df5db7
  1. 4
      Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs
  2. 4
      Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs

4
Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs

@ -3357,8 +3357,12 @@ namespace SqlSugar
List<TResult> result;
var isComplexModel = QueryBuilder.IsComplexModel(sqlObj.Key);
var entityType = typeof(TResult);
bool isChangeQueryableSlave = GetIsSlaveQuery();
bool isChangeQueryableMasterSlave = GetIsMasterQuery();
var dataReader = await this.Db.GetDataReaderAsync(sqlObj.Key, sqlObj.Value.ToArray());
result =await GetDataAsync<TResult>(isComplexModel, entityType, dataReader);
RestChangeMasterQuery(isChangeQueryableMasterSlave);
RestChangeSlaveQuery(isChangeQueryableSlave);
return result;
}

4
Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs

@ -3357,8 +3357,12 @@ namespace SqlSugar
List<TResult> result;
var isComplexModel = QueryBuilder.IsComplexModel(sqlObj.Key);
var entityType = typeof(TResult);
bool isChangeQueryableSlave = GetIsSlaveQuery();
bool isChangeQueryableMasterSlave = GetIsMasterQuery();
var dataReader = await this.Db.GetDataReaderAsync(sqlObj.Key, sqlObj.Value.ToArray());
result =await GetDataAsync<TResult>(isComplexModel, entityType, dataReader);
RestChangeMasterQuery(isChangeQueryableMasterSlave);
RestChangeSlaveQuery(isChangeQueryableSlave);
return result;
}

Loading…
Cancel
Save