Nextended.EF
10.1.34
See the version list below for details.
dotnet add package Nextended.EF --version 10.1.34
NuGet\Install-Package Nextended.EF -Version 10.1.34
<PackageReference Include="Nextended.EF" Version="10.1.34" />
<PackageVersion Include="Nextended.EF" Version="10.1.34" />
<PackageReference Include="Nextended.EF" />
paket add Nextended.EF --version 10.1.34
#r "nuget: Nextended.EF, 10.1.34"
#:package Nextended.EF@10.1.34
#addin nuget:?package=Nextended.EF&version=10.1.34
#tool nuget:?package=Nextended.EF&version=10.1.34
![]()
Nextended.EF
Entity Framework Core extensions โ graph loading (LoadGraphAsync, IncludeAll, MultiInclude), declarative include definitions, paging, dynamic sorting and bulk operations.
๐ Documentation: English ยท Deutsch
Installation
dotnet add package Nextended.EF
Bring your own EF Core provider (Npgsql.EntityFrameworkCore.PostgreSQL,
Microsoft.EntityFrameworkCore.SqlServer, โฆ).
Feature map
| Area | API |
|---|---|
| Graph loading | LoadGraphAsync, IncludeAll, MultiInclude, IncludeDetails, ThenIncludeDetails |
| Declarative includes | IncludeDefinitionFor<T>, IncludeAllVirtual, IncludeAllWhere, Without, WithoutRegex, Except, composable and attribute-driven |
| Query helpers | WhereContains, WhereKeyMatches, WhereBetween, WhereIn, WhereIf, ExistsAsync, AlternateQueryMatch |
| Paging & sorting | Page, ToPagedResultAsync, PagedResult<T>, OrderByMember, OrderByMembers, ThenByMember |
| Conditional composition | IncludeIf, AsTrackingIf, AsNoTrackingIf |
| DbContext helpers | FindEntityType<T>, GetPrimaryKeyPropertyNames<T>, GetPrimaryKeyValues, IsTrackedBy, DetachAll, GetOrAddAsync, GetOrCreateAsync |
| Bulk operations | BulkInsertAsync, BulkDeleteWhereAsync, UpsertAsync, UpsertRangeAsync (with an InMemory-provider fallback so tests keep working) |
Quick start
Load a graph without writing includes
using Nextended.EF;
// Walk navigations from a loaded entity, breadth-limited and cycle-safe.
var user = await dbContext.Users.FindAsync(userId);
await dbContext.LoadGraphAsync(user, maxDepth: 2);
LoadGraphAsync tracks visited instances in a HashSet, so a bidirectional navigation does not
recurse forever.
Include everything, minus the parts you don't want
// All navigations of the entity type
var products = await dbContext.Products
.IncludeAll(dbContext)
.ToListAsync();
// All navigations except specific paths
var users = await dbContext.Users
.IncludeAll(dbContext, new[] { "Orders.OrderItems" })
.ToListAsync();
// Or exclude with expressions instead of strings
var orders = await dbContext.Orders
.IncludeAll(dbContext, o => o.Customer)
.ToListAsync();
Multi-level includes without the ThenInclude staircase
var orders = await dbContext.Orders
.MultiInclude(
q => q.Include(o => o.OrderItems),
oi => oi.Product,
oi => oi.Product.Category)
.ToListAsync();
Reusable include definitions
Instead of repeating the same Include chains in every query, declare them once:
using Nextended.Core.IncludeDefinitions;
using Nextended.EF;
var detail = new IncludeDefinitionFor<Order>()
.Include(o => o.Customer)
.Include(o => o.OrderItems)
.IncludeAllVirtual() // every virtual navigation
.Without(o => o.InternalAuditTrail); // minus this one
var orders = await dbContext.Orders.IncludeDetails(detail).ToListAsync();
Definitions compose (CompositeIncludePathDefinition), can be filtered by glob or regex
(WithoutRegex, WithoutWhere), prefixed for nested use (IncludeWithPrefix) and derived from
attributes on the entity (AttributeIncludePathDefinition<T>).
Paging and dynamic sorting
var page = await dbContext.Products
.WhereIf(!string.IsNullOrEmpty(search), p => p.Name.Contains(search))
.OrderByMembers("Category.Name asc", "Price desc") // sort by string, from the client
.ToPagedResultAsync(pageIndex: 2, pageSize: 25);
page.Items; // the rows
page.TotalCount; // total before paging
page.PageIndex;
page.PageSize;
Conditional query composition
var query = dbContext.Orders
.AsNoTrackingIf(readOnly)
.IncludeIf(withCustomer, o => o.Customer)
.WhereIf(from.HasValue, o => o.Created >= from!.Value)
.WhereIn(o => o.Status, allowedStates)
.WhereBetween(o => o.Total, min, max);
Each *If helper returns the query untouched when the condition is false, so there is no
if cascade and no duplicated query builder.
Find-or-create and bulk work
var tag = await dbContext.Tags.GetOrCreateAsync(t => t.Name == "urgent", () => new Tag("urgent"));
await dbContext.BulkInsertAsync(newRows);
await dbContext.UpsertRangeAsync(rows, r => r.ExternalId);
await dbContext.BulkDeleteWhereAsync<LogEntry>(l => l.Created < cutoff);
UpsertAsync / BulkDeleteWhereAsync use provider-native paths where available and fall back to
change-tracker operations on the InMemory provider, so the same code runs in unit tests.
Supported frameworks
net8.0net9.0net10.0
Dependencies
- Nextended.Core
- Microsoft.EntityFrameworkCore
The Nextended family
The other 17 packages in the suite:
Core libraries
- Nextended.Core โ Foundation library โ extension methods, custom types (Money, Date, BaseId, SuperType), class mapping, deep clone, encryption, hashing and the code-generation attributes.
- Nextended.Cache โ Expression-based caching โ automatic cache keys from method expressions, CacheProvider with condition-based invalidation, thread-safe AddOrGetExisting.
Data access
- Nextended.EF โ Entity Framework Core extensions โ graph loading (LoadGraphAsync, IncludeAll, MultiInclude), declarative include definitions, paging, dynamic sorting and bulk operations. (this package)
ASP.NET Core & web
- Nextended.Web โ ASP.NET Core utilities โ zero-config OData (AddODataAuto), composable IQueryable OData appliers, strongly typed controller URLs, streaming download helpers and a background executor that can replay a captured request.
- Nextended.ResponseFilters โ Fluent, provider-agnostic pipeline that redacts, masks, rounds, truncates, hashes, prunes and restructures response DTOs before serialization โ per request, per user, per permission.
- Nextended.ResponseFilters.AspNetCore โ ASP.NET Core adapter for Nextended.ResponseFilters โ registers the pipeline as a global IAsyncResultFilter and replays structural edits against the serialized JSON tree.
UI libraries
- Nextended.Blazor โ Blazor helpers โ IBrowserFile extensions (bytes, data URLs, downloads), a hierarchical model for browsing inside uploaded zip/tar/rar archives, MIME-type detection and component-parameter reflection.
- Nextended.UI โ WPF and Windows desktop helpers โ a global input-binding manager with hold/sequence matching, DirectInput and XInput gamepad readers, key-bind capture controls, converters, behaviours, markup extensions and runtime-defined PropertyGrid types.
Code generation & tooling
- Nextended.Imaging โ Image processing โ aspect-preserving resize, crop, colour replacement, brightness-based foreground picking, thumbnail generation, byte/data-URL conversion and MIME detection from magic bytes.
- Nextended.CodeGen โ Roslyn source generator โ DTOs and interfaces from your entities, strongly typed classes from JSON/XML, lookup tables from Excel, and documentation from source files.
.NET Aspire hosting
- Nextended.Aspire โ Conditional AppHost builder extensions โ WithReferenceIf / WaitForIf / WithExplicitStartIf, strongly typed environment variables from config objects, HTTPS dev-cert wiring, Docker guards, GitHub-source resources and npm app discovery.
- Nextended.Aspire.Hosting.Supabase โ The complete Supabase stack โ Postgres, Auth (GoTrue), REST, Realtime, Storage, Studio, Kong and Edge Functions โ as one composable Aspire resource.
- Nextended.Aspire.Hosting.N8n โ The n8n workflow-automation platform as an Aspire resource, with Postgres persistence, workflow import and a typed client for triggering workflows from .NET.
- Nextended.Aspire.Hosting.Grafana โ Grafana, Prometheus, Loki, Tempo, Promtail, cAdvisor, postgres_exporter and the OpenTelemetry Collector as composable resources with auto-provisioned datasources.
- Nextended.Aspire.Hosting.WebDataStudio โ WebDataStudio โ a browser database studio for PostgreSQL, MySQL, SQL Server, SQLite, Oracle, DuckDB, ClickHouse, MongoDB and Redis โ wired to the databases of your stack, with accounts and roles, an optional SQL assistant, and an MCP endpoint for AI agents.
- Nextended.Aspire.Hosting.AspireUI โ AspireUI โ the visual AppHost builder โ as a resource inside your own Aspire stack, with an optional pre-seeded admin user and a starter stack built from your project paths.
- Nextended.Aspire.Hosting.LocalAI โ Self-hosted, OpenAI-compatible multimodal AI โ image generation, text-to-speech, speech-to-text and video โ with gallery model management, GPU support and Open WebUI.
- Nextended.Aspire.Hosting.Php โ Run PHP endpoints inside your Aspire stack โ a docroot folder or a single router script served by PHP's built-in web server, with php.ini settings as fluent options.
Links
- ๐ฆ NuGet package
- ๐ Documentation โ English
- ๐ Dokumentation โ Deutsch
- ๐ Documentation portal
- ๐งโ๐ป Source code
- ๐ Report an issue
License
GPL-3.0-or-later โ see LICENSE.
| 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 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. |
-
net10.0
- Microsoft.EntityFrameworkCore (>= 10.0.8)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.8)
- Microsoft.Extensions.Caching.Memory (>= 10.0.8)
- Nextended.Core (>= 10.1.34)
-
net8.0
- Microsoft.EntityFrameworkCore (>= 8.0.2)
- Microsoft.EntityFrameworkCore.Relational (>= 8.0.2)
- Microsoft.Extensions.Caching.Memory (>= 8.0.1)
- Nextended.Core (>= 10.1.34)
-
net9.0
- Microsoft.EntityFrameworkCore (>= 9.0.10)
- Microsoft.EntityFrameworkCore.Relational (>= 9.0.10)
- Microsoft.Extensions.Caching.Memory (>= 9.0.10)
- Nextended.Core (>= 10.1.34)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Nextended.EF:
| Package | Downloads |
|---|---|
|
Nextended.Web
Provides helper and extensions for Blazor, AspNetCore and Asp MVC web applications |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.1.35 | 86 | 8/30/2026 |
| 10.1.34 | 92 | 8/27/2026 |
| 10.1.33 | 107 | 8/24/2026 |
| 10.1.32 | 112 | 8/20/2026 |
| 10.1.31 | 106 | 8/19/2026 |
| 10.1.30 | 105 | 8/19/2026 |
| 10.1.21 | 138 | 7/30/2026 |
| 10.1.20 | 126 | 7/26/2026 |
| 10.1.19 | 115 | 7/23/2026 |
| 10.1.18 | 125 | 7/22/2026 |
| 10.1.17 | 127 | 7/21/2026 |
| 10.1.16 | 125 | 7/21/2026 |
| 10.1.15 | 123 | 7/21/2026 |
| 10.1.14 | 119 | 7/16/2026 |
| 10.1.13 | 123 | 7/12/2026 |
| 10.1.12 | 127 | 7/12/2026 |
| 10.1.11 | 134 | 7/6/2026 |
| 10.1.10 | 140 | 6/16/2026 |
| 10.1.9 | 140 | 5/29/2026 |
| 10.1.8 | 140 | 5/19/2026 |