Robotico.Specification 1.0.3

Robotico.Specification

Woodpecker CI

.NET 8 .NET 10 C# GitHub Packages Build

Specification pattern for .NET 8 and .NET 10. Composable query criteria as objects: ISpecification<T>, And, Or, Not. Use with repositories and EF Core. Zero dependencies.

Pattern

Reference Robotico.Specification when you use the Specification pattern: reusable, composable query criteria instead of ad-hoc predicates.

Features

  • ISpecification: IsSatisfiedBy(T candidate), optional ToExpression() for EF Core
  • Composition: And, Or, Not specifications
  • Zero dependencies: no EF or other packages required

Installation

dotnet add package Robotico.Specification

Quick start

using Robotico.Specification;

// Define a specification
public sealed class ActiveUsersSpec : ISpecification<User>
{
    public bool IsSatisfiedBy(User candidate) => candidate.IsActive;
    public System.Linq.Expressions.Expression<Func<User, bool>>? ToExpression() => u => u.IsActive;
}

// Compose
var spec = new ActiveUsersSpec().And(new VerifiedEmailSpec());
bool ok = spec.IsSatisfiedBy(user);

License

See repository license file.

No packages depend on Robotico.Specification.

.NET 8.0

.NET 10.0

Version Downloads Last updated
1.0.3 4 07/26/2026
1.0.2 3 06/03/2026