diff --git a/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/ResolveItems/MapperExpressionResolve.cs b/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/ResolveItems/MapperExpressionResolve.cs index cdea19074..9613f2ab9 100644 --- a/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/ResolveItems/MapperExpressionResolve.cs +++ b/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/ResolveItems/MapperExpressionResolve.cs @@ -17,7 +17,7 @@ namespace SqlSugar public MapperExpressionResolve(Expression expression, InvalidOperationException ex) { this.expression = expression; - NavgateExpression navgate = new NavgateExpression(); + NavgateExpression navgate = new NavgateExpression(context); if (navgate.IsNavgate(expression)) { navgate.Execute(this); diff --git a/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/ResolveItems/NavgateExpression.cs b/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/ResolveItems/NavgateExpression.cs index 09563e35e..a08f57907 100644 --- a/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/ResolveItems/NavgateExpression.cs +++ b/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/ResolveItems/NavgateExpression.cs @@ -9,6 +9,13 @@ namespace SqlSugar { internal class NavgateExpression { + private SqlSugarProvider context; + + public NavgateExpression(SqlSugarProvider context) + { + this.context = context; + } + internal bool IsNavgate(Expression expression) { var exp = expression;