SoulNETLib.EFCore 0.4.6

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

SoulNETLib.EFCore

Pagination support for Entity Framework Core. Provides PaginatedList<T> and PaginatedResult<T> with IQueryable extension methods for efficient server-side paging.

Installation

dotnet add package SoulNETLib.EFCore

Requirements: .NET 10+, Entity Framework Core

Features

  • PaginatedList<T> — Read-only collection with full pagination metadata (page count, row count, has previous/next).
  • PaginatedResult<T> — JSON-serializable wrapper for API responses with ordered property serialization.
  • IQueryable extensionsToPaginatedListAsync and ToPaginatedResultAsync for one-liner pagination.

Quick Start

Paginate a query

using SoulNETLib.EFCore.Extension;

var pagedItems = await dbContext.Products
    .Where(p => p.IsActive)
    .OrderBy(p => p.Name)
    .ToPaginatedListAsync(currentPage: 1, pageSize: 20);

// Access metadata
Console.WriteLine($"Page {pagedItems.CurrentPage} of {pagedItems.PageCount}");
Console.WriteLine($"Total rows: {pagedItems.RowCount}");
Console.WriteLine($"Has next: {pagedItems.HasNextPage}");

Return paginated result from an API

using SoulNETLib.EFCore.Extension;

var result = await dbContext.Orders
    .OrderByDescending(o => o.CreatedAt)
    .ToPaginatedResultAsync(page, pageSize);

// PaginatedResult<T> is ready for JSON serialization
return Results.Ok(result);

Pagination metadata

Both PaginatedList<T> and PaginatedResult<T> expose:

Property Description
CurrentPage Current page number (1-based)
PageSize Items per page
PageCount Total number of pages
RowCount Total number of items
HasPreviousPage Whether a previous page exists
HasNextPage Whether a next page exists

Feedback

Found a bug or have a suggestion? Open an issue on GitHub.

Contributing

Contributions are welcome! Fork the repository, make your changes, and submit a pull request. Please ensure all existing tests pass.

License

This package is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET 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.4.6 110 5/23/2026
0.4.5 112 5/18/2026
0.4.4 113 5/17/2026
0.4.3 109 5/11/2026
0.4.2 105 5/7/2026
0.4.1 103 5/6/2026
0.4.0 99 5/6/2026
0.3.0 128 3/13/2026
0.2.3 150 6/27/2025