예제 #1
0
        public IActionResult Get(long id)
        {
            var person = _usuarioBusiness.FindById(id);

            if (person == null)
            {
                return(NotFound());
            }
            return(Ok(person));
        }
예제 #2
0
        public IActionResult Get(int id)
        {
            Usuario _usuario = _usuarioBusiness.FindById(id);

            if (_usuario == null)
            {
                return(NotFound());
            }

            return(Ok(_usuario));
        }
예제 #3
0
 public IActionResult Get(int id)
 {
     try
     {
         var result = UsuarioBusiness.FindById(id);
         if (result == null)
         {
             return(NoContent());
         }
         return(Ok(result));
     }
     catch (Exception msg)
     {
         return(BadRequest("ERROR IN PROCESS THE REQUEST" + msg.Message));
     }
 }