From f9a6ea94edf0e3911d4bee4380feaac098ba5194 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Tue, 7 Jun 2022 16:54:17 +0800 Subject: [PATCH] Update .net core version --- .../QueryableProvider/NavigatManager.cs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/NavigatManager.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/NavigatManager.cs index 3a90e47d6..3da984a96 100644 --- a/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/NavigatManager.cs +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/NavigatManager.cs @@ -538,12 +538,26 @@ namespace SqlSugar else if (method.Method.Name == "Skip") { var exp = method.Arguments[1]; - result.Skip = (int)ExpressionTool.GetExpressionValue(exp); + if (exp is BinaryExpression) + { + result.Skip = (int)ExpressionTool.DynamicInvoke(exp); + } + else + { + result.Skip = (int)ExpressionTool.GetExpressionValue(exp); + } } else if (method.Method.Name == "Take") { var exp = method.Arguments[1]; - result.Take = (int)ExpressionTool.GetExpressionValue(exp); + if (exp is BinaryExpression) + { + result.Take = (int)ExpressionTool.DynamicInvoke(exp); + } + else + { + result.Take = (int)ExpressionTool.GetExpressionValue(exp); + } } else if (method.Method.Name == "ToList") {