- 增加 DTO 映射非导航属性的子表查询,可直接返回集合;

This commit is contained in:
2881099
2022-05-22 13:19:40 +08:00
parent 7d06846a33
commit 3782b029de
10 changed files with 309 additions and 65 deletions

View File

@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Reflection;
using System.Text;
@ -20,6 +21,7 @@ namespace FreeSql.Internal.Model
public bool IsEntity { get; set; }
public bool IsDefaultCtor { get; set; }
public string IncludeManyKey { get; set; } //ToList(a => new { a.Childs }) 集合属性指定加载
public Expression SubSelectMany { get; set; } //ToList(a => new { sublist = fsql.Select<T>().ToList() }) 子集合查询
public void CopyTo(ReadAnonymousTypeInfo target)
{
@ -42,6 +44,7 @@ namespace FreeSql.Internal.Model
public ReadAnonymousTypeInfo map { get; }
public string field { get; }
public List<NativeTuple<string, IList, int>> fillIncludeMany { get; set; } //回填集合属性的数据
public List<NativeTuple<Expression, IList, int>> fillSubSelectMany { get; set; } //回填集合属性的数据
public ReadAnonymousTypeAfInfo(ReadAnonymousTypeInfo map, string field)
{
this.map = map;