Zift.EntityFrameworkCore 0.8.0

dotnet add package Zift.EntityFrameworkCore --version 0.8.0
                    
NuGet\Install-Package Zift.EntityFrameworkCore -Version 0.8.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Zift.EntityFrameworkCore" Version="0.8.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Zift.EntityFrameworkCore" Version="0.8.0" />
                    
Directory.Packages.props
<PackageReference Include="Zift.EntityFrameworkCore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Zift.EntityFrameworkCore --version 0.8.0
                    
#r "nuget: Zift.EntityFrameworkCore, 0.8.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Zift.EntityFrameworkCore@0.8.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Zift.EntityFrameworkCore&version=0.8.0
                    
Install as a Cake Addin
#tool nuget:?package=Zift.EntityFrameworkCore&version=0.8.0
                    
Install as a Cake Tool

Zift Logo

NuGet NuGet Build & Publish

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.Email

  • Logical operators &&, ||, !

    Example: Price > 100 && Price < 500

  • Grouping (...) for evaluation order

    Example: (Price > 100 && Price < 500) || IsFeatured == true

  • Comparison operators ==, !=, <, <=, >, >=

    Example: Rating >= 4

  • String operators %= (contains), ^= (starts with), $= (ends with)

    Example: Title %= "C#"

  • in operator with list literals

    Example: 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 before AsCursorQuery() 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.8.0 94 1/8/2026
0.7.0 93 1/4/2026
0.6.3 171 10/12/2025
0.6.2 165 10/5/2025
0.6.1 255 6/8/2025
0.6.0 174 5/11/2025
0.5.0 127 5/9/2025
0.4.1 185 5/4/2025
0.4.0 138 5/4/2025
0.3.1 155 5/2/2025
0.3.0 170 4/30/2025