Last active
September 29, 2021 16:51
-
-
Save moostafaa/53f6198f979aed55149373ceb643a273 to your computer and use it in GitHub Desktop.
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 | |
{ | |
public SaleDocumentService(DiscerpancyAmountSpecification spec) | |
{...} | |
public void CalcAmount() | |
{ | |
saleDocumentObject.GetDiscerpancyAmount(spec); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment