Zift.EntityFrameworkCore
0.8.0
dotnet add package Zift.EntityFrameworkCore --version 0.8.0
NuGet\Install-Package Zift.EntityFrameworkCore -Version 0.8.0
<PackageReference Include="Zift.EntityFrameworkCore" Version="0.8.0" />
<PackageVersion Include="Zift.EntityFrameworkCore" Version="0.8.0" />
<PackageReference Include="Zift.EntityFrameworkCore" />
paket add Zift.EntityFrameworkCore --version 0.8.0
#r "nuget: Zift.EntityFrameworkCore, 0.8.0"
#:package Zift.EntityFrameworkCore@0.8.0
#addin nuget:?package=Zift.EntityFrameworkCore&version=0.8.0
#tool nuget:?package=Zift.EntityFrameworkCore&version=0.8.0

Zift is a lightweight, composable query library for .NET that adds dynamic filtering and pagination on top of IQueryable<T>.
It builds on existing IQueryable<T> queries using familiar LINQ operators such as Where(...) and OrderBy(...).
The library focuses on two core capabilities:
- Dynamic querying: string-based filtering via
Where(...) - Pagination: offset-based and cursor-based pagination
Dynamic Querying
Zift allows dynamic filtering using a compact, expressive string syntax that is parsed and translated into LINQ expression trees.
var categories = context.Categories
.Where("Products:any(Reviews:any(Rating >= 4))")
.ToList();
Supported Syntax
Property navigation
Name,Author.EmailLogical operators
&&,||,!Example:
Price > 100 && Price < 500Grouping
(...)for evaluation orderExample:
(Price > 100 && Price < 500) || IsFeatured == trueComparison operators
==,!=,<,<=,>,>=Example:
Rating >= 4String operators
%=(contains),^=(starts with),$=(ends with)Example:
Title %= "C#"inoperator with list literalsExample:
Status in ["Active", "Pending"]Quantifiers on collections
:any(predicate):all(predicate):any()(existence check)
Example:
Reviews:any(Author.Email $= "@example.com")Collection projections
:count
Example:
Products:count >= 2
Pagination
Zift supports two pagination strategies that operate directly on IQueryable<T> and can be combined with dynamic querying:
- Offset-based pagination
- Cursor-based pagination
Offset Pagination
Offset pagination is 1-based and uses Skip / Take under the hood. It is best suited for small to medium result sets where total counts are required.
var page = await context.Categories
.OrderBy(c => c.Name)
.ToPageAsync(pageNumber: 1, pageSize: 25);
Result shape
page.Items
page.PageNumber
page.PageSize
page.PageCount
page.HasNextPage
page.HasPreviousPage
page.TotalItemCount
Cursor Pagination
Cursor pagination (keyset pagination) is designed for stable and efficient traversal over ordered data, particularly for large or unbounded result sets.
It is enabled by calling AsCursorQuery() on the IQueryable<T>.
var page = context.Products
.AsCursorQuery()
.OrderBy("Name ASC, Price DESC")
.ToCursorPage(pageSize: 25);
Note: Ordering for cursor pagination must be applied after calling
AsCursorQuery(). Any ordering applied beforeAsCursorQuery()is ignored.
Cursor pagination requires at least one ordering clause to be provided; otherwise execution fails.
To continue navigation from a previously retrieved page, use the cursor values exposed by that page as anchors for further traversal.
// Forward traversal
if (page.HasNextPage)
{
var nextPage = query
.After(page.EndCursor)
.ToCursorPage(pageSize: 25);
}
// Backward traversal
if (page.HasPreviousPage)
{
var previousPage = query
.Before(page.StartCursor)
.ToCursorPage(pageSize: 25);
}
Result shape
page.Items
page.StartCursor
page.EndCursor
page.HasNextPage
page.HasPreviousPage
| 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
- Microsoft.EntityFrameworkCore (>= 10.0.0)
- Zift (>= 0.8.0)
-
net8.0
- Microsoft.EntityFrameworkCore (>= 8.0.10)
- Zift (>= 0.8.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.