Skip to content

Commit

Permalink
Fix the problem: case sensitive for a sort direction value.
Browse files Browse the repository at this point in the history
  • Loading branch information
NazarovMikhail committed Nov 21, 2023
1 parent c436455 commit 2fce080
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Monq.Core.Paging/Extensions/QueryableExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static IQueryable<TSource> OrderByProperty<TSource>(this IQueryable<TSour
// Декомпилируем свойства помеченные как Computed, чтобы EF мог их правильно воспринимать.
var lambda = Expression.Lambda(propExpr.Decompile().ExpressionCallsToConstants(), par);

if (string.IsNullOrEmpty(dir) || dir == "asc")
if (string.IsNullOrEmpty(dir) || dir.ToLower() == "asc")
return !isSubsequent
? data.OrderBy(lambda)
: data.ThenBy(lambda);
Expand Down

0 comments on commit 2fce080

Please sign in to comment.