コード例 #1
0
        public IActionResult Add([FromBody] ProposalModel model)
        {
            var addedProposal = proposalRepo.Add(model);

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