public IActionResult Add([FromBody] ProposalModel model) { var addedProposal = proposalRepo.Add(model); return(CreatedAtRoute("GetById", new { id = addedProposal.Id }, addedProposal)); }
public override Task <AddProposalResponse> Add( AddProposalRequest request, ServerCallContext context) { return(Task.FromResult(new AddProposalResponse { Proposal = repo.Add(request.Proposal) })); }