NSpecification 1.3.0

NSpecification is the most complete library for the Specification pattern and it's grounded on the Domain-Driven Design principles. Provides interface, abstract and a generic specification, composable, supports operators. This is probably the most fluent and least verbose library. Specifications can be composed with real operators (&, |, !, ==, !=). They are interchangeable with Expression<Func<T, bool>> and Func<T, bool> and can be combined directly with boolean expressions. Check the tutorial in the GitHub.

Install-Package NSpecification -Version 1.3.0
dotnet add package NSpecification --version 1.3.0
<PackageReference Include="NSpecification" Version="1.3.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NSpecification --version 1.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NSpecification, 1.3.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install NSpecification as a Cake Addin
#addin nuget:?package=NSpecification&version=1.3.0

// Install NSpecification as a Cake Tool
#tool nuget:?package=NSpecification&version=1.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

NSpecifications - Specifications on .net

What is the Specification Pattern?

When selecting a subset of objects, it allows to separate the statement of what kind of objects can be selected from the object that does the selection.

Ex:

A cargo has a separate storage specification to describe what kind of
container can contain it. The specification object has a clear and
limited responsibility, which can be separated and decoupled from the
domain object that uses it.

What can you do with Specification Pattern?

  1. Validate an object or check that only suitable objects are used for a certain role
  2. Select a subset of objects based a specified criteria, and refresh the selection at various times
  3. Describe what an object might do, without explaining the details of how the object does it, but in such a way that a candidate might be built to fulfill the requirement

NSpecifications - Specifications on .net

What is the Specification Pattern?

When selecting a subset of objects, it allows to separate the statement of what kind of objects can be selected from the object that does the selection.

Ex:

A cargo has a separate storage specification to describe what kind of
container can contain it. The specification object has a clear and
limited responsibility, which can be separated and decoupled from the
domain object that uses it.

What can you do with Specification Pattern?

  1. Validate an object or check that only suitable objects are used for a certain role
  2. Select a subset of objects based a specified criteria, and refresh the selection at various times
  3. Describe what an object might do, without explaining the details of how the object does it, but in such a way that a candidate might be built to fulfill the requirement

NuGet packages (1)

Showing the top 1 NuGet packages that depend on NSpecification:

Package Downloads
CqrsEase.EntityFramework
Implementation of generic CRUD operations for Entity Framework Core in Cqrs approach

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.3.0 23,020 3/23/2019