Installing System.Linq.Dynamic.Core

The IQueryable<T>.OrderBy() extension method that we used in the improved ApiResult source code to programmatically apply the column sorting is part of the System.Linq.Dynamic.Core namespace; thanks to this library, it's possible to write Dynamic LINQ queries (string-based) on an IQueryable, which is just like what we did in the preceding code.

Unfortunately, System.Linq.Dynamic.Core is not part of the .NET Core stock binaries; therefore, in order to use these features, we need to add it via NuGet. 

The fastest way to do that is to open Visual Studio's Package Manager Console and issue the following command:

> Install-Package System.Linq.Dynamic.Core

IMPORTANT: Be sure to install System.Linq.Dynamic.Core ...

Get ASP.NET Core 3 and Angular 9 - Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.