This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SaleDocument | |
{ | |
.... | |
public decimal GetDiscerpancyAmount(ISpecification<SaleDocument> spec) => | |
spec.IsSatisfiedBy(this) ? ConfirmedPrice - DocumentNetPrice : 0; | |
.... | |
} | |
public class SaleDocumentService | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public decimal GetDiscerpancyAmount(ISpecification<SaleDocument> spec) => | |
spec.IsSatisfiedBy(this) ? ConfirmedPrice - DocumentNetPrice : 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class OrderWithoutInvoiceSpecification : Specification<SaleDocument> | |
{ | |
... | |
} | |
public class ApprovedOrderWithoutInvoiceSpecification : AndSpecification<SaleDocument> | |
{ | |
public ApprovedOrderWithoutInvoiceSpecification() | |
: base(new ApprovedOrderSpecification(), new OrderWithoutInvoiceSpecification()) | |
{} | |
} |