eQuantic.Linq.Web.AspNetCore
3.6.0
See the version list below for details.
dotnet add package eQuantic.Linq.Web.AspNetCore --version 3.6.0
NuGet\Install-Package eQuantic.Linq.Web.AspNetCore -Version 3.6.0
<PackageReference Include="eQuantic.Linq.Web.AspNetCore" Version="3.6.0" />
<PackageVersion Include="eQuantic.Linq.Web.AspNetCore" Version="3.6.0" />
<PackageReference Include="eQuantic.Linq.Web.AspNetCore" />
paket add eQuantic.Linq.Web.AspNetCore --version 3.6.0
#r "nuget: eQuantic.Linq.Web.AspNetCore, 3.6.0"
#:package eQuantic.Linq.Web.AspNetCore@3.6.0
#addin nuget:?package=eQuantic.Linq.Web.AspNetCore&version=3.6.0
#tool nuget:?package=eQuantic.Linq.Web.AspNetCore&version=3.6.0
eQuantic.Linq.Web.AspNetCore
ASP.NET Core binding for eQuantic.Linq.Web: receive fully parsed entity queries straight from the request query string — in MVC controllers and in Minimal APIs.
Setup
builder.Services.AddEntityQueryBinding(); // optionally: options => { … }
Minimal APIs
app.MapGet("/orders", (EntityQueryModel<Order> query, AppDb db) =>
query.Apply(db.Orders));
// GET /orders?filter=status:in(Paid|Shipped),items.sum(price):gt(100)&orderBy=total:desc&take=10
Invalid syntax returns HTTP 400 with the parse error and its position.
MVC controllers
[ApiController]
[Route("orders")]
public class OrdersController : ControllerBase
{
[HttpGet]
public IActionResult Get(EntityQuery<Order> query) =>
Ok(query.Apply(db.Orders));
}
Parse errors land in ModelState, so [ApiController] produces the standard 400 problem-details
response automatically.
DTO → entity casting
Bind by the DTO shape your API exposes, run on entities:
app.MapGet("/orders", (EntityQueryModel<OrderDto> query, AppDb db) =>
query.Query.Cast(OrderCasts.ToEntity).Apply(db.Orders));
Whole queries as JSON bodies
POST-style search endpoints can bind the serializable envelope directly — filter, sorts, paging and projection in one document:
app.MapPost("/orders/search", (QueryModel<Order> body, AppDb db) =>
Results.Ok(body.ToEntityQuery(options).Apply(db.Orders).ToList()));
Extras
Request.ParseEntityQuery<T>()— binding-free parsing wherever you have anHttpRequest.AddEntityQueryBindingalso prepares MVC and minimal-API JSON options so serializedExpressionModel<T>payloads (including lean hand-written ones) bind from request bodies — string enums, out-of-order$typediscriminators and named floating-point literals included.- Harden untrusted input with
AddEntityQueryBinding(o => o.UseStrictSerializer(typeof(Order), …)).
Learn more
ASP.NET Core & Specifications guide · query-string syntax · security · all guides
MIT © eQuantic Tech
| Product | Versions 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. 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 is compatible. 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. |
-
net10.0
- eQuantic.Linq.Web (>= 3.6.0)
-
net8.0
- eQuantic.Linq.Web (>= 3.6.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on eQuantic.Linq.Web.AspNetCore:
| Package | Downloads |
|---|---|
|
eQuantic.Linq.Web.Swashbuckle
Swagger/OpenAPI documentation for eQuantic.Linq query strings via Swashbuckle: an operation filter that documents the filter/orderBy/skip/take/select parameters per endpoint with the complete syntax, the entity's actual member paths (camelCase, enums, [Column] aliases, collections) and generated examples. |
|
|
eQuantic.Linq.Web.OpenApi
OpenAPI documentation for eQuantic.Linq query strings via Microsoft.AspNetCore.OpenApi: an operation transformer that documents the filter/orderBy/skip/take/select parameters per endpoint with the complete syntax, the entity's actual member paths (camelCase, enums, [Column] aliases, collections) and generated examples. |
GitHub repositories
This package is not used by any popular GitHub repositories.
First preview: EntityQuery<T> model binding for MVC controllers and Minimal APIs, HttpRequest.ParseEntityQuery extension and AddEntityQueryBinding service registration.