FilterConditional 1.0.0

dotnet add package FilterConditional --version 1.0.0                
NuGet\Install-Package FilterConditional -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FilterConditional" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FilterConditional --version 1.0.0                
#r "nuget: FilterConditional, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install FilterConditional as a Cake Addin
#addin nuget:?package=FilterConditional&version=1.0.0

// Install FilterConditional as a Cake Tool
#tool nuget:?package=FilterConditional&version=1.0.0                

var fb = new ConditionalFilterGenerator<Your Entity>(Request.RequestUri.ParseQueryString(), new ConditionalFilterBuilder());

COMMENT:
first example

fb.And<int>((e, i) => e.Id > i, "id")
               .And<int>((e, i) => e.Id < 4, "Id")
               .Or<string>((e, s) => e.Name.StartsWith(s), "name");
COMMENT:
second example. This example contains in section 'Or' parameter type of boolean.
This parameter is talking if name-value 'Id' has been existed early in expression it is will not be used
NOTE: If name-value "id" or "name" not exists in the collection QueryString then expression will be skipped and will be used the expression 'Or'

fb.And<int, IEnumerable<string>>((e, i, a) => e.Id == i && a.Any(s => e.Name.StartsWith(s)), "id", "name")
               .Or<int>((e, i) => e.Id == 5, false, "id");

COMMENT:predicate result
var result = fb.GetConditional();

//In Controller will need add attribute
[ModelBinder(typeof(Your ModelBinder))]Expression<Func<Your Entity, bool>> pr  

Product Compatible and additional computed target framework versions.
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

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 1,512 3/2/2016