eQuantic.Linq.Web
3.7.1
dotnet add package eQuantic.Linq.Web --version 3.7.1
NuGet\Install-Package eQuantic.Linq.Web -Version 3.7.1
<PackageReference Include="eQuantic.Linq.Web" Version="3.7.1" />
<PackageVersion Include="eQuantic.Linq.Web" Version="3.7.1" />
<PackageReference Include="eQuantic.Linq.Web" />
paket add eQuantic.Linq.Web --version 3.7.1
#r "nuget: eQuantic.Linq.Web, 3.7.1"
#:package eQuantic.Linq.Web@3.7.1
#addin nuget:?package=eQuantic.Linq.Web&version=3.7.1
#tool nuget:?package=eQuantic.Linq.Web&version=3.7.1
eQuantic.Linq.Web
REST-friendly query-string syntax parsed straight into typed LINQ expression trees, powered by eQuantic.Linq.Expressions.
using eQuantic.Linq.Web;
// GET /orders?filter=total:gt(100),items:any(price:gt(50))&orderBy=total:desc&skip=0&take=10
var query = EntityQuery.Parse<Order>(Request.QueryString.Value);
var page = query.Apply(dbContext.Orders);
// or piecemeal:
var filtered = orders.WhereQueryString("status:in(Paid|Shipped),items.sum(price):gt(100)");
var sorted = orders.OrderByQueryString("customer.name.toLower():asc,total:desc");
Filter syntax
| Form | Example |
|---|---|
| Comparison | total:gt(100) — eq, neq, gt, gte, lt, lte |
| Strings | customer.name:ct(ali) — ct, nct, sw, ew |
| Shorthand equality | id:3, customer.isVip:true |
| Logical | and(…), or(…), not(…) — top-level commas mean AND |
| Membership | status:in(Paid\|Shipped), id:nin(1\|2) |
| Null tests | deliveredAt:eq(null), notes:neq(null) |
| Collections | items:any(price:gt(50),category:eq(Tech)), items:all(…) |
| Aggregates | items.count():gt(1), items.count(price:gt(100)):gte(1), items.sum(price):gt(200), min/max/average |
| Navigation | customer.address.city:eq(Lisboa) |
| Method segments | notes.toLower():ct(gift), customer.name.substring(0,3):eq(Ali) |
| Quoted values | notes:ct('Leave at'), name:eq('it''s') |
Values are plain text — the engine coerces them against the member's type (decimal, DateTime,
Guid, enums by name, booleans, nullables). Names match case-insensitively (including
[Column("…")] fallback), so camelCase URLs work naturally.
- Ordering:
orderBy=total:desc,customer.name(direction defaults toasc). - Paging:
skip/take. - Projection:
select=id,customer.name,items.count()— optionally aliased (select=name=customer.name) — materialized through emitted anonymous types.
DTO → entity casting
Consumers filter by the DTO shape your API exposes; queries run on entities:
using eQuantic.Linq.Expressions.Casting;
var cast = ExpressionCast.Create<OrderDto, Order>(o => o
.Map(d => d.CustomerName, e => e.Customer.Name)
.Map(d => d.Revenue, e => e.Items.Sum(i => i.Price * i.Quantity))
.Nested<ItemDto, OrderItem>(n => n.Map(i => i.Cost, e => e.Price)));
// GET /orders?filter=revenue:gt(200)&orderBy=revenue:desc
var page = EntityQuery.Parse<OrderDto>(qs).Cast(cast).Apply(dbContext.Orders);
Transport bridge
Every parsed filter is exposed as a serializable ExpressionModel<T>
(EntityQuery<T>.FilterModel, QueryFilter.ParseModel<T>) — and the whole query (filter +
sorts + paging + projection) round-trips as one JSON document:
QueryModel<Order> document = query.ToQueryModel(); // serializable POCO
var revived = document.ToEntityQuery(options).Apply(source); // anywhere else
Semantics & hardening
- Automatic null guards (
NullGuardMode.Auto, default): predicates applied to pure LINQ-to-objects sources get C#?.-style protection on deep paths; relational providers receive the clean tree (SQL is null-safe natively). - Untrusted input:
new QueryStringOptions().UseStrictSerializer(typeof(Order), …)locks type and method resolution to your contracts. Invalid syntax throwsQueryStringParseExceptionwith position information. - Parsed filters are cached per options instance (
CacheParsedFilters).
Learn more
Query-string syntax reference · DTO casting · security · all guides
MIT © eQuantic Tech
| Product | Versions 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 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. |
| .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. |
-
.NETStandard 2.0
- eQuantic.Linq.Expressions (>= 3.7.1)
-
net10.0
- eQuantic.Linq.Expressions (>= 3.7.1)
-
net8.0
- eQuantic.Linq.Expressions (>= 3.7.1)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on eQuantic.Linq.Web:
| Package | Downloads |
|---|---|
|
eQuantic.Core.Data
eQuantic Core Data Class Library |
|
|
eQuantic.Linq
The eQuantic.Linq engine as a single reference: a meta-package that brings in eQuantic.Linq.Expressions (expression ⇄ JSON serialization, inference, casting), eQuantic.Linq.Web (query-string syntax and typed builders) and eQuantic.Linq.Specification (the specification pattern). Framework-free core — the ASP.NET Core / Swagger / OpenAPI integrations remain opt-in packages. |
|
|
eQuantic.Core.Domain
eQuantic Domain Library |
|
|
eQuantic.Linq.Web.AspNetCore
ASP.NET Core binding for eQuantic.Linq.Web: receive EntityQuery<T> directly in MVC actions (model binder provider) and in Minimal APIs (EntityQueryModel<T> with BindAsync), with query-string parse errors surfaced as 400 responses and JSON options wired for expression-model payloads. |
|
|
eQuantic.Linq.Web.Specification
Query-string specifications for eQuantic.Linq: build composable, reusable specifications directly from REST filter query strings (property:op(value), and/or/not, any/all, aggregates) via eQuantic.Linq.Web. |
GitHub repositories
This package is not used by any popular GitHub repositories.
First preview: full filter grammar (comparisons, strings, logical composition, any/all, aggregates, method segments, in/nin, null tests, quoted values), sorting, paging, anonymous projections with aliases, EntityQuery<T> with DTO→entity Cast, and ExpressionModel transport bridge.