diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/NavigatManager.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/NavigatManager.cs index c91d9fd37..d3de1759a 100644 --- a/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/NavigatManager.cs +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/NavigatManager.cs @@ -586,7 +586,7 @@ namespace SqlSugar parameterIndex = queryable.QueryBuilder.LambdaExpressions.ParameterIndex; } } - else if (method.Method.Name == "OrderBy") + else if (method.Method.Name.IsIn( "OrderBy", "ThenBy")) { var exp = method.Arguments[1]; oredrBy.Add(" " + queryable.QueryBuilder.GetExpressionValue(exp, ResolveExpressType.WhereSingle).GetString()); @@ -606,7 +606,7 @@ namespace SqlSugar { Select(properyName, result, method, queryable); } - else if (method.Method.Name == "OrderByDescending") + else if (method.Method.Name.IsIn("OrderByDescending", "ThenByDescending")) { var exp = method.Arguments[1]; oredrBy.Add(" " + queryable.QueryBuilder.GetExpressionValue(exp, ResolveExpressType.WhereSingle).GetString() + " DESC");