mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-24 18:04:52 +08:00
Update Core
This commit is contained in:
parent
132b879871
commit
01a4c37d12
@ -59,16 +59,33 @@ namespace SqlSugar
|
||||
var whereExp = memberExp.Arguments[1];
|
||||
if (PropertyShortName.HasValue()&& Navigat!=null&& Navigat.NavigatType==NavigateType.OneToMany)
|
||||
{
|
||||
InitType(whereExp);
|
||||
var result = this.methodCallExpressionResolve.GetNewExpressionValue(whereExp, ResolveExpressType.WhereMultiple);
|
||||
return result;
|
||||
}
|
||||
else
|
||||
{
|
||||
InitType(whereExp);
|
||||
var result = this.methodCallExpressionResolve.GetNewExpressionValue(whereExp);
|
||||
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)
|
||||
{
|
||||
if (childExpression != null && childExpression is MemberExpression)
|
||||
|
Loading…
Reference in New Issue
Block a user