Exemple #1
0
 public IActionResult Post([FromBody] Usuario usuario)
 {
     if (usuario == null)
     {
         return(BadRequest());
     }
     return(new ObjectResult(_usuarioBusiness.Create(usuario)));
 }
 public IActionResult CreateUsuario([FromBody] Usuario entity)
 {
     try
     {
         usuarioBusiness.Create(entity);
         return(Ok(true));
     }
     catch (Exception)
     {
         throw;
     }
 }
 public IActionResult Post([FromBody] Usuario Usuario)
 {
     try
     {
         var result = UsuarioBusiness.Create(Usuario);
         if (result == null)
         {
             return(NoContent());
         }
         return(Ok(result));
     }
     catch (Exception msg)
     {
         return(BadRequest("ERROR IN PROCESS THE REQUEST" + msg.Message));
     }
 }