public ActionResult<AccelerationDTO> Get(int id) { return Ok(_mapper.Map<AccelerationDTO>(_service.FindById(id))); }
public ActionResult <AccelerationDTO> Get(int id) { var accelid = _service.FindById(id); var accelidDTO = _mapper.Map <AccelerationDTO>(accelid); return(Ok(accelidDTO)); }
public ActionResult <AccelerationDTO> Get(int?id) { if (id == null) { return(NoContent()); } else { var idNotNull = id.GetValueOrDefault(); var acceleration = _accelerationService.FindById(idNotNull); return(Ok(_mapper.Map <AccelerationDTO>(acceleration))); } }
public ActionResult <AccelerationDTO> Get(int id) { Acceleration acceleration = _accelerationService.FindById(id); AccelerationDTO accelerationDTO = null; if (acceleration != null) { accelerationDTO = _mapper.Map <AccelerationDTO>(acceleration); } return(Ok(accelerationDTO)); }
public ActionResult <AccelerationDTO> Get(int id) { var _acceleration = _accelerationService.FindById(id); if (_acceleration != null) { var retorno = _mapper.Map <AccelerationDTO>(_acceleration); return(Ok(retorno)); } else { return(NoContent()); } }
public ActionResult <AccelerationDTO> Get(int id) { var acceleration = _accelerationService.FindById(id); if (acceleration != null) { // Substituir mapeamento de objeto manual por mapeamento com AutoMapper return(Ok(_mapper.Map <AccelerationDTO>(acceleration))); } else { return(NotFound()); } }
public ActionResult <IEnumerable <AccelerationDTO> > Get(int Id) { var acceleration = _accelerationService.FindById(Id); if (acceleration != null) { var retorno = _mapper.Map <AccelerationDTO>(acceleration); return(Ok(retorno)); } else { return(NotFound()); } }
public ActionResult <AccelerationDTO> Get(int id) { try { var acceleration = _service.FindById(id); var result = _mapper.Map <AccelerationDTO>(acceleration); if (result == null || result.Id != id) { return(NotFound(id)); } return(Ok(result)); } catch (Exception) { throw; } }
public ActionResult <AccelerationDTO> Get(int id) { //deve apontar para o método FindById e retornar um AccelerationDTO var acceleration = _accelerationService.FindById(id); if (acceleration != null) { var retorno = _mapper.Map <AccelerationDTO>(acceleration); return(Ok(retorno)); } else { return(NotFound()); } }
public ActionResult <AccelerationDTO> Get(int id) { var company = _accelerationService.FindById(id); return(Ok(_mapper.Map <AccelerationDTO>(company))); }
public ActionResult <AccelerationDTO> Get(int id) { var obj = mapper.Map <AccelerationDTO>(service.FindById(id)); return(Ok(obj)); }
public ActionResult <AccelerationDTO> Get(int id) { var result = _service.FindById(id); return(Ok(_mapper.Map <AccelerationDTO>(result))); }
public ActionResult <AccelerationDTO> Get(int id) { var response = _mapper.Map <AccelerationDTO>(_accelerationService.FindById(id)); return(Ok(response)); }