- 增加 IncludeMany(a => a.Childs).ToList(a => new { a.Childs }) 指定集合属性返回;

This commit is contained in:
28810
2020-09-06 00:42:44 +08:00
parent 59ecfdf288
commit 24e0fcd0af
8 changed files with 265 additions and 44 deletions

View File

@ -1,4 +1,5 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
@ -17,6 +18,7 @@ namespace FreeSql.Internal.Model
public TableInfo Table { get; set; }
public bool IsEntity { get; set; }
public bool IsDefaultCtor { get; set; }
public string IncludeManyKey { get; set; } //ToList(a => new { a.Childs }) 集合属性指定加载
public void CopyTo(ReadAnonymousTypeInfo target)
{
@ -30,12 +32,14 @@ namespace FreeSql.Internal.Model
target.Table = Table;
target.IsEntity = IsEntity;
target.IsDefaultCtor = IsDefaultCtor;
target.IncludeManyKey = IncludeManyKey;
}
}
public class ReadAnonymousTypeAfInfo
{
public ReadAnonymousTypeInfo map { get; }
public string field { get; }
public List<NativeTuple<string, IList, int>> fillIncludeMany { get; set; } //回填集合属性的数据
public ReadAnonymousTypeAfInfo(ReadAnonymousTypeInfo map, string field)
{
this.map = map;