var proposalSubmitService = new ProposalSubmitService(repository); var command = new ProposalSubmitCommand(); proposalSubmitService.Handle(command); } private IProposalRepository CreateRepository(string input) { switch (input) { case "local" : return new InMemoryProposalRepository(); case "production" : return new SqlProposalRepository(); default: throw new ArgumentOutOfRangeException(); } }
var proposalSubmitService = new ProposalSubmitService(repository); var command = new ProposalSubmitCommand(); proposalSubmitService.Handle(command); } private IProposalRepository CreateRepository(string input) { switch (input) { case "local" : return new InMemoryProposalRepository(); case "production" : return new SqlProposalRepository(); default: throw new ArgumentOutOfRangeException(); } }
var proposalSubmitService = new ProposalSubmitService(repository); var command = new ProposalSubmitCommand(); proposalSubmitService.Handle(command); } private IProposalRepository CreateRepository(string input) { switch (input) { case "local" : return new InMemoryProposalRepository(); case "production" : return new SqlProposalRepository(); default: throw new ArgumentOutOfRangeException(); } }
var proposalSubmitService = new ProposalSubmitService(repository); var command = new ProposalSubmitCommand(); proposalSubmitService.Handle(command); } private IProposalRepository CreateRepository(string input) { switch (input) { case "local" : return new InMemoryProposalRepository(); case "production" : return new SqlProposalRepository(); default: throw new ArgumentOutOfRangeException(); } }
var proposalSubmitService = new ProposalSubmitService(repository); var command = new ProposalSubmitCommand(); proposalSubmitService.Handle(command); } private IProposalRepository CreateRepository(string input) { switch (input) { case "local" : return new InMemoryProposalRepository(); case "production" : return new SqlProposalRepository(); default: throw new ArgumentOutOfRangeException(); } }