Slide 25
Slide 25 text
25
public class ProposalSubmitService
{
private readonly IProposalRepository proposalRepository;
public ProposalSubmitService(IProposalRepository proposalRepository)
{
this.proposalRepository = proposalRepository;
}
public void Handle(ProposalSubmitCommand command)
{
...
var proposal = new Proposal(command.Title, command.Outline);
proposalRepository.Save(proposal);
...
}
}