Filtering.Net.EntityFrameworkCore 0.1.2

dotnet add package Filtering.Net.EntityFrameworkCore --version 0.1.2
                    
NuGet\Install-Package Filtering.Net.EntityFrameworkCore -Version 0.1.2
                    
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="Filtering.Net.EntityFrameworkCore" Version="0.1.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Filtering.Net.EntityFrameworkCore" Version="0.1.2" />
                    
Directory.Packages.props
<PackageReference Include="Filtering.Net.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 Filtering.Net.EntityFrameworkCore --version 0.1.2
                    
#r "nuget: Filtering.Net.EntityFrameworkCore, 0.1.2"
                    
#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 Filtering.Net.EntityFrameworkCore@0.1.2
                    
#: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=Filtering.Net.EntityFrameworkCore&version=0.1.2
                    
Install as a Cake Addin
#tool nuget:?package=Filtering.Net.EntityFrameworkCore&version=0.1.2
                    
Install as a Cake Tool

Filtering.Net.EntityFrameworkCore

EF Core async helpers for Filtering.Net. Adds IQueryable<T>.ApplyPagedAsync(...) and PageResult<T>.

Targets net8.0, net9.0, and net10.0.

What it solves

Filtering.Net itself stays netstandard2.0 and avoids any EF Core dependency, so it can load inside the analyzer process and on every consumer TFM. EF-specific async sequencing (CountAsync + ToListAsync + PageResult<T> packaging) lives in this package — install it when your call site is an EF Core controller / handler that wants a one-call paged response.

Install

dotnet add package Filtering.Net
dotnet add package Filtering.Net.Generator
dotnet add package Filtering.Net.EntityFrameworkCore

The first two are required (runtime + generator). This package adds the EF-specific helpers on top.

Quickstart

Given a [GenerateFilter<User>] partial (see Filtering.Net.Generator) and an EF DbContext:

[ApiController]
[Route("users")]
public sealed class UsersController : ControllerBase
{
    [HttpPost("search")]
    public async Task<ActionResult<PageResult<User>>> Search(
        [FromBody] FilterRequest request,
        [FromServices] IFilterDefinition<User> userFilter,
        [FromServices] AppDbContext dbContext,
        CancellationToken cancellationToken)
    {
        try
        {
            PageResult<User> page = await dbContext.Users
                .ApplyPagedAsync(userFilter, request, cancellationToken);
            return Ok(page);
        }
        catch (FilterValidationException invalid)
        {
            return BadRequest(invalid.Result);
        }
    }
}

ApplyPagedAsync validates the request, applies filter + sort, runs CountAsync + ToListAsync against the EF provider, and packages the results into a PageResult<T>.

Key types

  • PageResult<T>Items, TotalCount, Page, PageSize. Computed members: TotalPages, HasPrevious, HasNext. Don't store the computed members; they round-trip through the constructor.
  • FilteringEntityFrameworkExtensions.ApplyPagedAsync — the one extension method this package adds: IQueryable<T>.ApplyPagedAsync(IFilterDefinition<T>, FilterRequest, CancellationToken).

EF version pinning

Target framework EF Core version
net8.0 8.0.13 (LTS floor — patches GHSA-qj66-m88j-hmgj)
net9.0 9.0.5 (patches GHSA-qj66-m88j-hmgj)
net10.0 10.0.0 (LTS floor)

Bumping these is intentional — the integration tests run against both, so a floor bump is a contract-affecting change.

See also

License

MIT.

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 is compatible.  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.1.2 100 5/6/2026
0.1.1 84 5/5/2026
0.1.0 88 5/5/2026