Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Dynamic LINQ in Asp Core 3.1

$
0
0

Hi all,

I'm trying to implement dynamic OrderBy using Dynamic LINQ in an Asp Core 3.1 project, here's what I have:

orderedList = filters.SortDirection.ToLower(CultureInfo.CurrentCulture) == "asc"
                    ? orderedList.OrderBy(filters.SortBy).ToList()
                    : orderedList.OrderByDescending(filters.SortBy).ToList();

I note that on the Nuget page (https://www.nuget.org/packages/System.Linq.Dynamic.Core/) it specifies Asp Core 2.1, does anyone know if this can or cannot be used in 3.1 and if not is there an alternative way of achieving this in 3.1?


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>