public ActionResult <Engineer> GetById(long id) { var engineer = _service.GetById(id); if (engineer == null) { return(NotFound()); } return(engineer); }
public IActionResult Get(int id) { var response = _mapper.Map <Engineer, EngineerViewModel>(_engineers.GetById(id)); return(StatusCode((int)HttpStatusCode.OK, response)); }