A specification template is a generic template used in DDD that encapsulates business logic to answer one question.
public interface ISpecification<T> { bool IsSatisfiedBy(T aSource); } public class CustomerHaveDiscountSpec : ISpecification<Customer> { bool IsSatisfiedBy(Customer aCustomer) { } }
What other templates are common for domain-driven design?
oop design-patterns domain-driven-design
Amir rezaei
source share