Dynamic filtering, sorting, paging, and projection for IQueryable in .NET.
FlexQuery.NET is a dynamic query engine for .NET REST APIs. It transforms complex query parameters into secure, server-side expression trees — filtering, sorting, paging, and projecting data with a single line of code.
var result = await _context.Users.FlexQueryAsync(parameters, opts =>
{
opts.AllowedFields = ["Id", "Name", "Email", "Status"];
});Works with Entity Framework Core, Dapper, and other FlexQuery.NET providers.
- No OData Dependency — Get powerful querying without OData's complexity and tight coupling
- 100% Server-Side — All operations translate to SQL via expression trees — zero client evaluation
- Security First — Declare allowed/blocked fields per-endpoint with strict validation
- Multi-Format — Auto-detects DSL, JSON, JQL, and OData query syntax on the same endpoint
- Multiple Data Providers — Works with EF Core, Dapper, or any IQueryable source
graph TD
Core["FlexQuery.NET"]
Core --> EF["FlexQuery.NET.EntityFrameworkCore"]
Core --> Dapper["FlexQuery.NET.Dapper"]
Core --> AspNet["FlexQuery.NET.AspNetCore"]
Core --> Diag["FlexQuery.NET.Diagnostics"]
EF --> AgGrid["FlexQuery.NET.Adapters.AgGrid"]
EF --> Kendo["FlexQuery.NET.Adapters.Kendo"]
Dapper --> AgGrid
Dapper --> Kendo
AspNet --> AgGrid
AspNet --> Kendo
Core --> Jql["FlexQuery.NET.Parsers.Jql"]
Core --> OData["FlexQuery.NET.Parsers.MiniOData"]
| Package | Purpose |
|---|---|
| FlexQuery.NET | Core query engine — parsing, filtering, sorting, paging, projection, validation |
| FlexQuery.NET.EntityFrameworkCore | Async execution and filtered includes for EF Core |
| FlexQuery.NET.Dapper | SQL generation and execution for Dapper |
| FlexQuery.NET.AspNetCore | ASP.NET Core integration with [FieldAccess] security attributes |
| FlexQuery.NET.Diagnostics | Execution diagnostics, timing, and observability |
| FlexQuery.NET.Adapters.AgGrid | AG Grid Server-Side Row Model (SSRM) request/response adapter |
| FlexQuery.NET.Adapters.Kendo | Kendo UI DataSource request adapter |
| FlexQuery.NET.Parsers.Jql | JQL (Jira Query Language) syntax parser |
| FlexQuery.NET.Parsers.MiniOData | Lightweight OData-compatible syntax parser |
GET /api/users?filter=age:gte:18&sort=name:asc&page=1&pageSize=20 # DSL (default)
GET /api/users?filter=Age >= 18 AND Status = 'Active' # JQL
GET /api/users?$filter=Age ge 18 and Status eq 'Active' # ODatadotnet add package FlexQuery.NET.EntityFrameworkCoreFull guide: flexquery.vercel.app/guide/getting-started
- Getting Started
- Query Composition
- Security & Governance
- EF Core Provider
- Dapper Provider
- AG Grid Integration
- Kendo Integration
- GitHub Samples
MIT License. See LICENSE.