public async Task <ActionResult <AirplaneViewModel> > Get(Guid id) { var user = (await _airplaneService.GetById(id)).ToViewModel(); if (user == null) { _logger.LogInformation($"Airplane id = {id} not found."); return(NotFound()); } return(new ObjectResult(user)); }
public async Task <IActionResult> Get(int id) { AirplaneDTO plane = await service.GetById(id); if (plane == null) { return(NotFound()); } return(Ok(plane)); }
public AirplaneDto GetById(Guid id) { return(_service.GetById(id)); }
public Airplane Get(int id) { return(service.GetById(id)); }
public Airplane GetById(int id) { return(_airplaneService.GetById(id)); }
public async Task <AirplaneViewModel> GetById([FromRoute] Guid id) { return(_mapper.Map <AirplaneViewModel>(await _dbAirplane.GetById(id))); }