Ejemplo n.º 1
0
        public ActionResult <Engineer> GetById(long id)
        {
            var engineer = _service.GetById(id);

            if (engineer == null)
            {
                return(NotFound());
            }
            return(engineer);
        }
Ejemplo n.º 2
0
        public IActionResult Get(int id)
        {
            var response = _mapper.Map <Engineer, EngineerViewModel>(_engineers.GetById(id));

            return(StatusCode((int)HttpStatusCode.OK, response));
        }