DDD Specification with AND Operator
Hi dear friends,
Sorry because I know this topic is a bit of pain,
I'm working with
Now I have the following interface that represents a Specification:
And I have created an
The issue:
The issue is that
All I want that method do is to take an
I have tried the
From your experience, what is the ideal/efficient implementation for that
Massive thanks in advance <3
Sorry because I know this topic is a bit of pain,
I'm working with
DDD, as you know DDD came with a useful pain solution called Specifications,Now I have the following interface that represents a Specification:
And I have created an
Abstract class who represents this specification as the following:The issue:
The issue is that
And method I don't know how to well implement it, I will do a brief explaination,All I want that method do is to take an
ISpecification<T> and returns another/ a new ISpecification<T> that represents the First specification's expression combined with the second Specification's expression by AND operator.I have tried the
Github Copilot but it suggests on me to create a new specification called AndSpecification and that method should returns a new instance of that AndSpecification.From your experience, what is the ideal/efficient implementation for that
And method ??Massive thanks in advance <3