PTrampert.QueryObjects 1.7.10

dotnet add package PTrampert.QueryObjects --version 1.7.10
                    
NuGet\Install-Package PTrampert.QueryObjects -Version 1.7.10
                    
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="PTrampert.QueryObjects" Version="1.7.10" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PTrampert.QueryObjects" Version="1.7.10" />
                    
Directory.Packages.props
<PackageReference Include="PTrampert.QueryObjects" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PTrampert.QueryObjects --version 1.7.10
                    
#r "nuget: PTrampert.QueryObjects, 1.7.10"
                    
#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.
#:package PTrampert.QueryObjects@1.7.10
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PTrampert.QueryObjects&version=1.7.10
                    
Install as a Cake Addin
#tool nuget:?package=PTrampert.QueryObjects&version=1.7.10
                    
Install as a Cake Tool

PTrampert.QueryObjects

NuGet Version

Attribute-based query objects for LINQ/IQueryable in .NET

Overview

PTrampert.QueryObjects is a .NET library that enables you to define query objects using attributes, making it easy to build dynamic, type-safe queries for IQueryable<T> sources. By annotating properties on your query object, you can declaratively specify how each property should filter your data, and then apply the query object to any IQueryable<T> using a simple extension method.

Features

  • Attribute-based query object filtering
  • Supports custom query logic via IQueryObject<T>
  • Works with any IQueryable<T> (e.g. Entity Framework, MongoDB) or IEnumerable<T>

Example Usage

Suppose you have a target class and a query object:

public class Person
{
    public int Age { get; set; }
    public string Name { get; set; } = string.Empty;
}

public class PersonQuery
{
    [EqualsQuery]
    public int? Age { get; set; }

    [StringContainsQuery]
    public string? Name { get; set; }
}

You can use your query object to filter an IQueryable<Person>:

using PTrampert.QueryObjects;

var people = new List<Person>
{
    new Person { Age = 30, Name = "Alice" },
    new Person { Age = 40, Name = "Bob" },
    new Person { Age = 30, Name = "Caroline" }
};

var query = new PersonQuery { Age = 30, Name = "li" };

var filtered = people.Where(query).ToList();
// filtered contains Alice and Caroline

Full documentation can be found here

License

This project is licensed under the MIT License. See the LICENSE file for details.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.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
1.7.10 34 1/10/2026
1.7.9 77 1/6/2026
1.7.8 73 1/6/2026
1.7.7 182 11/27/2025
1.7.6 176 11/27/2025
1.7.5 146 11/7/2025
1.7.4 126 10/31/2025
1.7.3 156 10/12/2025
1.7.2 176 10/9/2025
1.7.1 189 10/3/2025
1.7.0 113 9/27/2025
1.6.5 111 9/26/2025
1.6.4 188 9/23/2025
1.6.3 310 9/18/2025
1.6.2 305 9/18/2025
1.6.1 292 9/18/2025
1.6.0 307 9/18/2025
1.5.1 187 9/11/2025
1.5.0 180 9/11/2025
1.4.6 162 9/6/2025
1.4.5 157 9/6/2025
1.4.4 154 9/6/2025
1.4.3 161 9/6/2025
1.4.2 152 9/6/2025
1.4.1 154 9/6/2025
1.4.0 158 9/6/2025
1.3.1 158 9/6/2025
1.3.0 150 9/6/2025
1.2.2 156 9/6/2025
1.2.1 163 9/6/2025
1.2.0 159 9/6/2025
1.1.3 251 8/24/2025
1.1.2 246 8/24/2025
1.1.1 250 8/24/2025
1.1.0 251 8/24/2025
1.0.0 261 8/24/2025