public async Task <ActionResult> GetByIdAsync(int id) { BlAirplane airplaneBl = await _airplaneService.GetByIdAsync(id); Airplane airplane = _mapper.Map <Airplane>(airplaneBl); if (airplane == null) { return(NotFound()); } return(Ok(airplane)); }