This commit is contained in:
28810
2020-08-27 00:48:08 +08:00
parent a634192af9
commit 6ae9297684
26 changed files with 57 additions and 181 deletions

View File

@ -142,7 +142,9 @@ namespace FreeSql.Internal
if (grouping != null && exp is MemberExpression expMem2 && expMem2.Member.Name == "Key" && expMem2.Expression.Type.FullName.StartsWith("FreeSql.ISelectGroupingAggregate`"))
{
field.Append(grouping._field);
var parentProp = parent.Property;
grouping._map.CopyTo(parent);
parent.Property = parentProp; //若不加此行,会引用 GroupBy(..).ToList(a => new Dto { key = a.Key }) null 错误CopyTo 之后 Property 变为 null
return false;
}
parent.CsType = exp.Type;