Linq.Extension 1.0.0.7

.NET Core 2.1 .NET Framework 4.5
Install-Package Linq.Extension -Version 1.0.0.7
dotnet add package Linq.Extension --version 1.0.0.7
<PackageReference Include="Linq.Extension" Version="1.0.0.7" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Linq.Extension --version 1.0.0.7
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Linq.Extension, 1.0.0.7"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Linq.Extension as a Cake Addin
#addin nuget:?package=Linq.Extension&version=1.0.0.7

// Install Linq.Extension as a Cake Tool
#tool nuget:?package=Linq.Extension&version=1.0.0.7
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

/////////////////////////////////////// Pagination and Search Example ////////////////////////////////////////////////////////////////////// { "pagination" : {"take": 100, "skip": 100, "sorts": [{"fieldName": "created", "direction": "desc"}, {"fieldName": "quantity", "direction": "asc"}]}, "search" : {"filters": [{ "logic": "or", "operation": "eq", "value": 3245, "fieldName": "orderId" }, { "logic": "and", "operation": "inlist", "value": "32,66,87,199", "fieldName": "customerId" }, { "logic": "and", "operation": "gte", "value": 600, "fieldName": "customerId" } ]}}

Above Json object is converted to conditionalArguments as IDictionary<string, object> conditionalArguments and passed to following query. From above dictionary first entry will be like that key = "pagination", value ={ "take": 100, "skip": 100, "sorts": [{"fieldName": "created", "direction": "desc"}, {"fieldName": "quantity", "direction": "asc"}]} value will be an object containing Json object.

var res = this._context.Hobbies .AsNoTracking() .Where(LinqDynamicExtension.DynamicWherePredicate <HobbyDataLayer.Models.Hobby>(conditionalArguments)) .Pagination(conditionalArguments) .Select(LinqDynamicExtension.DynamicSelectGeneratorAnomouysType <HobbyDataLayer.Models.Hobby>(selectionFields)) .ToList() .ToNonAnonymousList(typeof(HobbyDataLayer.Models.Hobby));

var results = (IEnumerable<HobbyDataLayer.Models.Hobby>) res;

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Framework net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0.7 306 10/4/2020
1.0.0.5 551 7/30/2020
1.0.0.4 257 7/29/2020
1.0.0.3 301 7/29/2020
1.0.0.2 265 7/28/2020
1.0.0.1 260 7/28/2020
1.0.0 303 7/27/2020

Added Nesting Predicates with parenthesis for same field name. Grouped same field name expressions into one parenthesis and apply the logic of first filter of sequence of same field with other fields.