public IEnumerable <PilotListItem> Get([FromQuery] int?userID) { if (userID == null) { return(_aviBL.GetPilots().Select(pilot => PilotListItem.FromDLModel(pilot))); } return(_aviBL.GetPilotsByProducerID((int)userID).Select(pilot => PilotListItem.FromDLModel(pilot))); }
public IEnumerable <PilotListItem> Get() { return(_aviBL.GetPilots().Select(pilot => PilotListItem.FromDLModel(pilot))); }