public async Task <IActionResult> Get() { List <PlaneDTO> temp = await planeService.GetPlaneCollection(); if (temp != null) { return(Ok(temp)); } else { return(BadRequest()); } }
public IEnumerable <PlaneDTO> Get() { IEnumerable <PlaneDTO> temp = planeService.GetPlaneCollection(); if (temp != null) { Response.StatusCode = 200; } else { Response.StatusCode = 404; } return(temp); }