Beispiel #1
0
        public IActionResult GetById(int id)
        {
            var user  = _profesorService.GetById(id);
            var model = _mapper.Map <Users>(user);

            return(Ok(model));
        }
 public async Task <IActionResult> GetById(int id)
 {
     try
     {
         return(new JsonResult(await _service.GetById(id))
         {
             StatusCode = 200
         });
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
 public Models.ProfesorAdmin GetById(int id)
 {
     return(_service.GetById(id));
 }