Esempio n. 1
0
 public async Task <IActionResult> Post([FromBody] CriaEventoCommand command)
 {
     try{
         return(Ok(_eventoHandler.Handle(command)));
     }catch (System.Exception) {
         return(this.StatusCode(StatusCodes.Status500InternalServerError, "Falha interna"));
     }
 }
 public async Task <IActionResult> Post([FromBody] CriaEventoCommand command)
 {
     try
     {
         return(Ok(_eventoHandler.Handle(command)));
     }
     catch (Exception ex)
     {
         return(this.StatusCode(StatusCodes.Status500InternalServerError, ex.Message));
     }
 }