Komair.Specifications.EntityFrameworkCore 10.1.1

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

Komair.Specifications.EntityFrameworkCore

Entity Framework Core query composition helpers for Komair specifications. This package adds optional data-layer integration while keeping the core specification package provider-agnostic.

Key Types

  • QueryableSpecificationExtensions – static extension methods on IQueryable<T> that compose Komair specifications with LINQ for use with EF Core. See Key Methods for the public surface.

Key Methods

  • Where – applies an ISpecification<T> as a filter when it always applies.
  • WhereIf – overloads that apply a specification or a predicate only when a Boolean condition is true, so optional filters (search fields, toggles) stay in one fluent chain without branching into separate Where calls. Prefer Where or Queryable.Where when the filter is unconditional. Arguments are still evaluated and null-checked before the method runs; see the XML documentation remarks on each overload for details.

Where helper vs specification.ToExpression()

query.Where(specification.ToExpression()) and query.Where(specification) compile to the same LINQ shape: both supply an Expression<Func<T, Boolean>> to Queryable.Where. The extension method is ergonomics, a discoverable entry point, and a single place for XML documentation; it does not change EF Core translation.

Parameterization and literals

EF Core binds values captured from the surrounding scope (closure fields, locals, parameters) as parameters in SQL, which helps plan cache reuse and avoids treating user input as raw SQL. The exact placeholder names depend on the provider and EF version (for example @p0 or @_id in diagnostic SQL).

Compile-time constants inside the expression tree are often emitted as literals in SQL. Prefer Where(t => t.Id == id) with a variable or parameter id over building text that you splice into queries.

Use EF.Functions (and related database-function surfaces) when you need provider-translated calls such as Like or collations; ordinary .NET methods on entities may not translate.

Untranslatable or client-evaluated expressions

Specifications that work for in-memory IsSatisfiedBy can still fail translation or fall back to client evaluation (or throw) when used as IQueryable filters, depending on the provider and expression shape. When a query misbehaves, enable detailed logging, inspect the generated SQL (ToQueryString() on relational providers where supported), and consult EF Core documentation for translation rules.

Dependencies

Installation

dotnet add package Komair.Specifications.EntityFrameworkCore
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
10.1.1 88 5/12/2026