Skip to content

Instantly share code, notes, and snippets.

@angelovstanton
Created January 24, 2016 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save angelovstanton/883129267436e666421c to your computer and use it in GitHub Desktop.
Save angelovstanton/883129267436e666421c to your computer and use it in GitHub Desktop.
public class NotSpecification<TEntity> : Specification<TEntity>
{
private readonly ISpecification<TEntity> specification;
public NotSpecification(ISpecification<TEntity> specification)
{
this.specification = specification;
}
public override bool IsSatisfiedBy(TEntity entity)
{
return !this.specification.IsSatisfiedBy(entity);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment