コード例 #1
0
 public async Task <IActionResult> Add(CategoriaModel model)
 {
     try
     {
         return(Ok(await _service.Add(model)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
コード例 #2
0
        public ActionResult <CategoriaResponse> Post(CategoriaRequest request)
        {
            CategoriaResponse response = _service.Add(request);

            return(Ok(response));
        }