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" />
paket add NSpecification --version 1.3.0
#r "nuget: NSpecification, 1.3.0"
// 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
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?
- Validate an object or check that only suitable objects are used for a certain role
- Select a subset of objects based a specified criteria, and refresh the selection at various times
- 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?
- Validate an object or check that only suitable objects are used for a certain role
- Select a subset of objects based a specified criteria, and refresh the selection at various times
- 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
Dependencies
-
.NETStandard 1.3
- NETStandard.Library (>= 1.6.1)
Used By
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,255 | 3/23/2019 |