DynamicQuery.NetFramework 2.0.1

dotnet add package DynamicQuery.NetFramework --version 2.0.1
                    
NuGet\Install-Package DynamicQuery.NetFramework -Version 2.0.1
                    
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="DynamicQuery.NetFramework" Version="2.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DynamicQuery.NetFramework" Version="2.0.1" />
                    
Directory.Packages.props
<PackageReference Include="DynamicQuery.NetFramework" />
                    
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 DynamicQuery.NetFramework --version 2.0.1
                    
#r "nuget: DynamicQuery.NetFramework, 2.0.1"
                    
#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 DynamicQuery.NetFramework@2.0.1
                    
#: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=DynamicQuery.NetFramework&version=2.0.1
                    
Install as a Cake Addin
#tool nuget:?package=DynamicQuery.NetFramework&version=2.0.1
                    
Install as a Cake Tool

DynamicQuery.AspNetCore

NuGet CI codecov

OData-inspired URL query binding for ASP.NET Core. Parses query string parameters into LINQ expression trees for filtering, sorting, paging, and projection.

This library is not GraphQL. It binds REST query parameters such as ?query=name=Bruno&order=name&page=0&pagesize=10 to strongly typed expressions you can use with IQueryable, EF Core, or in-memory collections.

Renamed from Graphql.DynamicFilter

This project was originally published as Graphql.DynamicFilter on NuGet (~41k downloads). The old name was misleading — the library provides OData-style URL query binding, not GraphQL.

Starting with 2.0, development continues under new package IDs:

Legacy package (1.x) New package (2.x)
Graphql.DynamicFilter DynamicQuery.AspNetCore
Graphql.DynamicFilter.NetFramework DynamicQuery.NetFramework

The query string format is unchanged. Only the package name, namespaces, and type names changed (DynamicFilter<T>DynamicQuery<T>).

Packages

Package Description
DynamicQuery.AspNetCore ASP.NET Core (net8.0, net9.0, net10.0) — controllers and minimal APIs
DynamicQuery.NetFramework ASP.NET MVC 5 on .NET Framework 4.7.2

Installation

dotnet add package DynamicQuery.AspNetCore

Quick start — Controllers

using DynamicQuery.AspNetCore;

[HttpGet]
public Task<List<User>> Get(DynamicQuery<User> query)
{
    var result = _users.Apply(query).ToList();
    return Task.FromResult(result);
}

Example request:

GET /api/users?query=name=Bruno

Generated expression:

x => x.Name == "Bruno"

Quick start — Minimal APIs

app.MapGet("/users", (DynamicQuery<User> query) =>
{
    return users.Apply(query).ToList();
});

DynamicQuery<T> implements the minimal API BindAsync convention automatically.

Query syntax

Multiple filters are combined with AND (comma-separated). Use | within a value for OR.

Operator Example Meaning
Equals name=Bruno exact match
Contains (case-insensitive) name%b substring
Contains (case-sensitive) name%%B substring
Greater than age>15
Greater or equal age>=15
Less than age<15
Less or equal age<=15
Not equals age!=15
Nested property address.number=23 dot notation

Use query= or filter= for the filter parameter (both are supported).

Ordering

GET /api/users?query=name%b&order=name=Asc
GET /api/users?query=name%b&order=name=Desc

If direction is omitted, default is Desc (same as v1.x ASP.NET Core behavior).

Paging

GET /api/users?query=name%b&order=name&page=0&pagesize=10

Projection (select)

GET /api/users?select=name,age

Populates query.Select (Expression<Func<T,T>>) and query.SelectText.

Apply helper

using DynamicQuery.AspNetCore;

// In-memory collections (uses compiled expressions)
var items = users.Apply(query);

// IQueryable / EF Core (uses expression trees)
var items = dbContext.Users.Apply(query);

MVC registration (optional)

Model binding works via the [ModelBinder] attribute on DynamicQuery<T>. To register the binder provider explicitly:

builder.Services.AddControllers()
    .AddDynamicQuery();

Migration from Graphql.DynamicFilter 1.x

If you installed the old package:

# Remove the legacy package
dotnet remove package Graphql.DynamicFilter

# Install the renamed package
dotnet add package DynamicQuery.AspNetCore

Update your code:

  • using Graphql.DynamicFilteringusing DynamicQuery.AspNetCore
  • DynamicFilter<T>DynamicQuery<T>

Full details: CHANGELOG.md

Development

dotnet build DynamicQuery.sln
dotnet test DynamicQuery.sln

License

MIT — see LICENSE.

Product Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
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
2.0.1 30 6/5/2026
2.0.0 34 6/5/2026