Skip to content

Instantly share code, notes, and snippets.

@moostafaa
Created September 29, 2021 15:52
Show Gist options
  • Save moostafaa/ae5613b11d0d57e4ba2e107cce701ff9 to your computer and use it in GitHub Desktop.
Save moostafaa/ae5613b11d0d57e4ba2e107cce701ff9 to your computer and use it in GitHub Desktop.
public class OrderWithoutInvoiceSpecification : Specification<SaleDocument>
{
...
}
public class ApprovedOrderWithoutInvoiceSpecification : AndSpecification<SaleDocument>
{
public ApprovedOrderWithoutInvoiceSpecification()
: base(new ApprovedOrderSpecification(), new OrderWithoutInvoiceSpecification())
{}
}
public class WaitingForInvoicesSpecification : AndSpecification<SaleDocument>
{
public WaitingForInvoicesSpecification()
: base(new ApprovedOrderWithoutInvoice(), new HasDiscrepancySpecification())
{
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment