Getting Started
Everything you need to start building dynamic queries in your .NET applications.
Overview#
NetQueryBuilder is a .NET library for building dynamic, type-safe queries using expression trees.
At its core it is ORM-independent, compiling LINQ expressions at runtime so you can target any
IQueryable data source. Ready-made integrations are provided for
Entity Framework Core, Blazor, ASP.NET Core,
and WPF, letting you drop a full-featured query builder UI into your application
with minimal setup.
The library supports .NET 6, .NET 8, .NET 9, .NET Standard 2.1, and .NET Framework 4.8, so it works across modern and legacy projects alike.
Choose Your Framework#
Pick the integration that matches your application stack. Each package builds on the core engine and adds framework-specific UI and services.
Blazor
Interactive query builder with MudBlazor-based components. Best for modern web apps.
ASP.NET Core
Server-rendered with Tag Helpers and View Components. No JavaScript required.
WPF
Desktop query builder with Material Design styling and MVVM architecture.
Core Library Only
Use the core API directly for custom integrations or non-UI scenarios.
Quick Installation#
Install the packages you need via the .NET CLI. Choose the combination that fits your project.
Blazor + EF Core (most common)
dotnet add package NetQueryBuilder dotnet add package NetQueryBuilder.EntityFramework dotnet add package NetQueryBuilder.Blazor
ASP.NET Core + EF Core
dotnet add package NetQueryBuilder.AspNetCore
The NetQueryBuilder.AspNetCore package includes NetQueryBuilder and NetQueryBuilder.EntityFramework as dependencies, so you only need a single install command.
WPF + EF Core
dotnet add package NetQueryBuilder dotnet add package NetQueryBuilder.EntityFramework dotnet add package NetQueryBuilder.WPF
Core only (custom integration)
dotnet add package NetQueryBuilder
Your First Query#
Here is a minimal example that creates a configurator, builds a query for an entity type, adds a condition, and executes it.
// Create a configurator var configurator = new QueryableQueryConfigurator(); // Build a query for your entity type var query = configurator.BuildFor<Product>(); // Add a condition var nameProperty = query.ConditionPropertyPaths .First(p => p.PropertyFullName == "Name"); query.Condition.CreateNew<EqualsOperator>(nameProperty, "Widget"); // Execute the query var results = await query.Execute(50);
Package Overview#
The ecosystem is modular. Install only what you need.
| Package | Description | Frameworks |
|---|---|---|
NetQueryBuilder |
Core query building engine with expression trees | .NET 6/8/9, Standard 2.1, Framework 4.8 |
NetQueryBuilder.EntityFramework |
EF Core integration with navigation properties | .NET 6/8/9 |
NetQueryBuilder.EntityFrameworkNet4 |
EF 6 integration for legacy apps | .NET Framework 4.8 |
NetQueryBuilder.Blazor |
Interactive UI components for Blazor | .NET 6/8/9 |
NetQueryBuilder.AspNetCore |
Tag Helpers, View Components, session management | .NET 6/8/9 |
NetQueryBuilder.WPF |
MVVM controls for WPF desktop apps | .NET 6/8/9 |
Live Demos#
See NetQueryBuilder in action with the two hosted demo applications.
Blazor Interactive Demo — Full-featured query builder with MudBlazor components, real-time expression preview, and result tables.
ASP.NET Core Demo — Server-side Razor Pages with Tag Helpers and View Components. No JavaScript required.