namespace Bahla.Domain.Specifications.Base { public abstract class CompositeSpecification : ISpecification where T : class { public abstract bool IsSatisfiedBy(T entity); public ISpecification And(ISpecification other) => new AndSpecification(this, other); public ISpecification AndNot(ISpecification other) => new AndNotSpecification(this, other); public ISpecification Not() => new NotSpecification(this); public ISpecification Or(ISpecification other) => new OrSpecification(this, other); public ISpecification OrNot(ISpecification other) => new OrNotSpecification(this, other); } }