Talrace.Core.Predicates 8.0.0

dotnet add package Talrace.Core.Predicates --version 8.0.0
NuGet\Install-Package Talrace.Core.Predicates -Version 8.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="Talrace.Core.Predicates" Version="8.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Talrace.Core.Predicates --version 8.0.0
#r "nuget: Talrace.Core.Predicates, 8.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 Talrace.Core.Predicates as a Cake Addin
#addin nuget:?package=Talrace.Core.Predicates&version=8.0.0

// Install Talrace.Core.Predicates as a Cake Tool
#tool nuget:?package=Talrace.Core.Predicates&version=8.0.0

About

This package provides a set of extension methods for combining delegates and lambda expressions with AND or OR conditions. The provided extension methods can be used to execute dynamic LINQ queries. This package can be used with EntityFramework to create dynamic database queries.

Available extension methods

And - extension method for Func<bool> type. Creates Func<bool> that represents a conditional AND operation between two Func<bool> operands.

And<T> - extension method for Func<T, bool> type. Creates Func<T, bool> that represents a conditional AND operation between two Func<T, bool> operands.

And<T, T2> - extension method for Func<T, T2, bool> type. Creates Func<T, T2, bool> that represents a conditional AND operation between two Func<T, T2, bool> operands.

And - extension method for Expression<Func<bool>> type. Creates Expression<Func<bool>> that represents a conditional AND operation between two Expression<Func<bool>> operands.

And<T> - extension method for Expression<Func<T, bool>> type. Creates Expression<Func<T, bool>> that represents a conditional AND operation between two Expression<Func<T, bool>> operands.

And<T, T2> - extension method for Expression<Func<T, T2, bool>> type. Creates Expression<Func<T, T2, bool>> that represents a conditional AND operation between two Expression<Func<T, T2, bool>> operands.

Or - extension method for Expression<Func<bool>> type. Creates Expression<Func<bool>> that represents a conditional OR operation between two Expression<Func<bool>> operands.

Or<T> - extension method for Expression<Func<T, bool>> type. Creates Expression<Func<T, bool>> that represents a conditional OR operation between two Expression<Func<T, bool>> operands.

Or<T, T2> - extension method for Expression<Func<T, T2, bool>> type. Creates Expression<Func<T, T2, bool>> that represents a conditional OR operation between two Expression<Func<T, T2, bool>> operands.

Sample

var list = Enumerable.Range(1, 1000);

Expression<Func<int, bool>> predicate = x => x >= 0;
predicate = predicate.And(x => x <= 2);
predicate = predicate.Or(x => x > 999).Or(x => x >= 20 && x <= 22);

var count = list.AsQueryable().Where(predicate).Count();
// count = 6;
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • 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
8.0.0 763 11/30/2023
6.0.3 4,136 3/28/2023
6.0.2 2,888 2/2/2023
6.0.1 4,850 5/5/2022
6.0.0 427 4/27/2022
3.1.19 334 9/24/2021
3.1.10 7,896 12/16/2020
3.1.0 3,908 4/13/2020