LINQ helper extensions for RepositoryKit. Adds support for Paginate, OrderByField, Chunk, and ForEach operations on IQueryable and IEnumerable.
$ dotnet add package RepositoryKit.Extensions
Reusable LINQ and Collection Extensions for RepositoryKit and .NET
This package provides provider-agnostic extension methods for LINQ queries and collections.
| File | Highlights & Example Methods |
|---|---|
IQueryableExtensions.cs | ToPagedList, ApplySorting, DynamicWhere, SelectAs |
IEnumerableExtensions.cs | ForEach, SafeDistinct, Shuffle, GroupBySelect |
Chain extension methods in your query and projection flow:
var paged = db.Products.Query().ApplySorting("Name").ToPagedList(page: 1, pageSize: 10);
var summaries = paged.SelectAs(x => new ProductSummaryDto
{
Id = x.Id,
Name = x.Name
});
paged.ForEach(product => Console.WriteLine(product.Name));
IQueryable<T> and IEnumerable<T>MIT © Ataberk Kaya
📎 Designed to be used with RepositoryKit, but useful in any .NET project