5.0.4 BUG

This commit is contained in:
sunkaixuna 2021-09-29 17:28:49 +08:00
parent 6459c6e1f5
commit b9318e014a
2 changed files with 5 additions and 0 deletions
Src/Asp.Net/SqlSugar
ExpressionsToSql/ResolveItems
Infrastructure

View File

@ -446,6 +446,7 @@ namespace SqlSugar
var mappingKeys = GetMappingColumns(parameter.CurrentExpression);
var isSameType = mappingKeys.Keys.Count>0;
CallContextThread<Dictionary<string,string>>.SetData("Exp_Select_Mapping_Key", mappingKeys);
CallContextAsync<Dictionary<string, string>>.SetData("Exp_Select_Mapping_Key", mappingKeys);
this.Expression = item;
this.Start();
var shortName = parameter.CommonTempData;

View File

@ -272,6 +272,10 @@ namespace SqlSugar
{
var readerValues = DataReaderToDictionary(reader, tType);
var mappingKeys = CallContextThread<Dictionary<string, string>>.GetData("Exp_Select_Mapping_Key");
if (mappingKeys == null)
{
mappingKeys = CallContextAsync<Dictionary<string, string>>.GetData("Exp_Select_Mapping_Key");
}
var result = new Dictionary<string, object>();
foreach (var item in classProperties)
{