Created
October 11, 2019 01:30
-
-
Save MarcoNicolodi/2efba9ced677f49b51ee4943f757bc67 to your computer and use it in GitHub Desktop.
Using a Domain Service so our domain logic doesnt leak to the Application Service
This file contains hidden or 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 ProposalService | |
| { | |
| public void AcceptProposal(Guid proposalId) | |
| { | |
| var proposal = _repository.Find(proposalId); | |
| proposal.Accept(); | |
| _repository.Save(proposal); | |
| _domainService.DenyOtherCompaniesProposals(proposal); | |
| _logger.Info($"Proposal {proposal.id} was accepted"); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment