public IActionResult Add([FromBody] ProposalModel model)
        {
            var addedProposal = proposalRepo.Add(model);

            return(CreatedAtRoute("GetById", new { id = addedProposal.Id },
                                  addedProposal));
        }
Beispiel #2
0
 public override Task <AddProposalResponse> Add(
     AddProposalRequest request, ServerCallContext context)
 {
     return(Task.FromResult(new AddProposalResponse
     {
         Proposal = repo.Add(request.Proposal)
     }));
 }