Ardalis.Specification.EntityFrameworkCore 10.0.0

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

Ardalis.Specification

IMPORTANT This is the last MIT-licensed release of this library. Future releases will require a (potentially free) commercial license. Find out more

A .NET library for building query specifications.

A specification pulls query logic (filtering, ordering, includes, paging, and projections) out of controllers, services, and custom repository methods into small, named, reusable classes. A handful of generic repository methods can then run any specification, which removes most duplicated LINQ expressions and custom query methods. Companion packages provide evaluators and a ready-to-use RepositoryBase<T> for EF Core (Ardalis.Specification.EntityFrameworkCore) and EF6 (Ardalis.Specification.EntityFramework6).

Release Notes

This is the last MIT-licensed release of this library (see above).

  • Updated to the latest supported .NET frameworks (.NET 10, .NET 11) with continued NetStandard2.0 support (#553)
    • Breaking: dropped the net8.0 and net9.0 targets (.NET 8 and 9 are out of support). Projects that can't use .NET 10+ get the netstandard2.0 build of Ardalis.Specification instead.
    • Breaking (Ardalis.Specification.EntityFrameworkCore): now targets net10.0 and net11.0 only, and requires EF Core 10 or 11.
    • Ardalis.Specification.EntityFramework6 keeps its net472 target for .NET Framework apps.
  • Updated all NuGet dependencies (#553)
  • NuGet package now ships its own focused readme

Usage

Define a specification:

using Ardalis.Specification;

public class ActiveCustomersByNameSpec : Specification<Customer>
{
    public ActiveCustomersByNameSpec(string name)
    {
        Query.Where(c => c.IsActive && c.Name.StartsWith(name));
        Query.OrderBy(c => c.Name);
        Query.Include(c => c.Addresses);
    }
}

Then pass it to a repository:

// RepositoryBase<T> comes from Ardalis.Specification.EntityFrameworkCore
public class Repository<T>(AppDbContext dbContext)
    : RepositoryBase<T>(dbContext), IRepositoryBase<T> where T : class
{
}

var spec = new ActiveCustomersByNameSpec("Ard");
List<Customer> customers = await repository.ListAsync(spec, cancellationToken);

See the Ardalis.Specification documentation for the full usage guide.

Roadmap

This is our roadmap for this package:

Version 10.x

This version. The last MIT-licensed package.

Version 15.x

The next version. It will have minimal changes from 10.x but will have a dual license and a compile-time license check and any planned breaking changes will be marked [Obsolete] if possible to signal what's coming. It will also be released both as Ardalis.Specification and as NimbleTools.Specification but with identical behavior to make upgrades as easy as possible, both now and in the future.

Why the jump from 10 to 15? We want to consolidate the 3 Ardalis packages that are moving to commercial licensing (GuardClauses, SmartEnum, Specification) and, like Aspire, we want to keep our version numbers separated from .NET's version numbers. Starting at 15 for all 3 lets us do that.

Version 16.x

This is where we expect to introduce potentially breaking changes as we rethink, refactor, and improve the implementation of the library. We will not break the API without a good reason, but there are some inconsistencies and places where we can improve the usability and sometimes the performance and this will be the time to make such changes.

Stay informed of changes by adding your email here: https://nimbletools.io/updates

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.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (105)

Showing the top 5 NuGet packages that depend on Ardalis.Specification.EntityFrameworkCore:

Package Downloads
Delfin.Core.Infrastructure

An Infrastructure Layer library designed for Clean Architecture in .NET applications. This package provides the implementation of cross-cutting concerns such as data access, external service integration, and configuration management, ensuring that the application layers remain decoupled from infrastructure details.

CX.SharedKernel.Abstractions

Package Description

BL.Framework.Persistence.EntityFrameworkCore

Package Description

Fabricdot.Infrastructure.EntityFrameworkCore

Build DDD infrastructure layer with Entity Framework Core

Wcz.Layout

Package Description

GitHub repositories (14)

Showing the top 14 popular GitHub repositories that depend on Ardalis.Specification.EntityFrameworkCore:

Repository Stars
ardalis/CleanArchitecture
Clean Architecture Solution Template: A proven Clean Architecture Template for ASP.NET Core 10
dotnet-architecture/eShopOnWeb
Sample ASP.NET Core 8.0 reference application, now community supported: https://github.com/NimblePros/eShopOnWeb
neozhu/CleanArchitectureWithBlazorServer
This repository is designed to create an enterprise Blazor Server application that follows the principles of Clean Architecture and implements Blazor Clean Architecture best practices for scalability, maintainability, and testability.
mehdihadeli/food-delivery-microservices
🍔 A practical and cloud-native food delivery microservices, built with .Net Aspire, .Net 10, Wolverine, Domain-Driven Design, CQRS, Vertical Slice Architecture, Event-Driven Architecture, and the latest technologies.
NimblePros/eShopOnWeb
Sample ASP.NET Core 10.0 reference application, powered by Microsoft, demonstrating a domain-centric application architecture with monolithic deployment model.
SSWConsulting/SSW.VerticalSliceArchitecture
An enterprise ready solution template for Vertical Slice Architecture. This template is just one way to apply the Vertical Slice Architecture.
mehdihadeli/vertical-slice-api-template
🍰 An asp.net core template based on .Net 10, Vertical Slice Architecture, CQRS, Minimal APIs, OpenTelemetry, API Versioning and OpenAPI.
MicrosoftLearning/eShopOnWeb
Repository maintained by AZ-400 course and Learn content community. Project used for AZ-400 Labs. Forked from: https://github.com/dotnet-architecture/eShopOnWeb Sample - ASP.NET Core 8.0 reference application, powered by Microsoft, demonstrating a layered application architecture with monolithic deployment model.
SSWConsulting/SSW.CleanArchitecture
SSW Clean Architecture Template
DevBetterCom/DevBetterWeb
A simple web application for devBetter
ardalis/DotNetDataAccessTour
A tour of different data access approaches in .NET 8+.
aehyok/.NET8.0
net8.0 efcore mysql redis rabbitmq 微服务
ardalis/HttpClientTestExtensions
Extensions for testing HTTP endpoints and deserializing the results. Currently works with XUnit.
baotoq/micro-commerce
.NET 10 .NET Aspire
Version Downloads Last Updated
10.0.0 10 11/24/2026
9.3.1 3,813,163 8/24/2025
9.3.0 132,195 8/20/2025
9.2.0 825,733 6/8/2025
9.1.0 584,562 4/23/2025
9.0.1 331,562 3/14/2025
9.0.0 69,694 3/13/2025
8.0.0 6,234,421 11/22/2023
7.0.0 1,329,084 5/26/2023
6.1.0 2,241,669 6/24/2022
6.0.1 850,191 1/19/2022
6.0.0 44,927 1/18/2022
5.2.0 488,148 9/7/2021
5.1.0 227,745 4/17/2021
5.0.3 46,806 3/5/2021
5.0.1-beta 1,785 3/1/2021
5.0.0-beta 1,845 3/1/2021
4.2.0 198,436 1/29/2021
4.1.0 296,365 9/4/2020
Loading failed

Version 10.0.0 - the last MIT-licensed release. Future releases will require a (potentially free) commercial license: https://nimbletools.io/news/ardalis-nuget-packages/
     * Targets net10.0, net11.0 and netstandard2.0 (Ardalis.Specification), net10.0 and net11.0 (EntityFrameworkCore), net10.0, net11.0 and net472 (EntityFramework6)
     * Breaking: dropped net8.0 and net9.0 targets; EntityFrameworkCore package now requires EF Core 10 or 11
     * Updated all NuGet dependencies
     * NuGet package now ships its own focused readme
     Full change log: https://github.com/ardalis/Specification/releases