mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-23 12:33:44 +08:00
Update Core
This commit is contained in:
@@ -59,16 +59,33 @@ namespace SqlSugar
|
|||||||
var whereExp = memberExp.Arguments[1];
|
var whereExp = memberExp.Arguments[1];
|
||||||
if (PropertyShortName.HasValue()&& Navigat!=null&& Navigat.NavigatType==NavigateType.OneToMany)
|
if (PropertyShortName.HasValue()&& Navigat!=null&& Navigat.NavigatType==NavigateType.OneToMany)
|
||||||
{
|
{
|
||||||
|
InitType(whereExp);
|
||||||
var result = this.methodCallExpressionResolve.GetNewExpressionValue(whereExp, ResolveExpressType.WhereMultiple);
|
var result = this.methodCallExpressionResolve.GetNewExpressionValue(whereExp, ResolveExpressType.WhereMultiple);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
InitType(whereExp);
|
||||||
var result = this.methodCallExpressionResolve.GetNewExpressionValue(whereExp);
|
var result = this.methodCallExpressionResolve.GetNewExpressionValue(whereExp);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void InitType(Expression whereExp)
|
||||||
|
{
|
||||||
|
if (whereExp is LambdaExpression)
|
||||||
|
{
|
||||||
|
var parameters = (whereExp as LambdaExpression).Parameters;
|
||||||
|
if (parameters != null && parameters.Count > 0)
|
||||||
|
{
|
||||||
|
foreach (var item in parameters)
|
||||||
|
{
|
||||||
|
this.context.InitMappingInfo(item.Type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private bool ValidateNav(bool result, MemberExpression memberExp, Expression childExpression)
|
private bool ValidateNav(bool result, MemberExpression memberExp, Expression childExpression)
|
||||||
{
|
{
|
||||||
if (childExpression != null && childExpression is MemberExpression)
|
if (childExpression != null && childExpression is MemberExpression)
|
||||||
|
Reference in New Issue
Block a user