mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Special integration usage includes(x=> x.items.tolist ())
This commit is contained in:
parent
9a537821c1
commit
a45f728062
@ -93,6 +93,22 @@ namespace SqlSugar
|
|||||||
private InsertNavProvider<Root, TChild> _ThenInclude<TChild>(Expression<Func<T, List<TChild>>> expression) where TChild : class, new()
|
private InsertNavProvider<Root, TChild> _ThenInclude<TChild>(Expression<Func<T, List<TChild>>> expression) where TChild : class, new()
|
||||||
{
|
{
|
||||||
var name = ExpressionTool.GetMemberName(expression);
|
var name = ExpressionTool.GetMemberName(expression);
|
||||||
|
if (expression is LambdaExpression lambda)
|
||||||
|
{
|
||||||
|
if (lambda.Body is MethodCallExpression method)
|
||||||
|
{
|
||||||
|
if (method.Method.Name == "ToList")
|
||||||
|
{
|
||||||
|
if (method.Arguments.FirstOrDefault() is { } arg)
|
||||||
|
{
|
||||||
|
if (arg is MemberExpression member)
|
||||||
|
{
|
||||||
|
name = member.Member.Name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
var isRoot = false;
|
var isRoot = false;
|
||||||
if (this._ParentEntity == null)
|
if (this._ParentEntity == null)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user