public IActionResult Flight(string fromCode, string toCode) { FlightViewModel model = new FlightViewModel(); model.From = fromCode; model.To = toCode; model.departs = _flightRep.GetBy(model.From, model.To).ToArray(); model.returns = _flightRep.GetBy(model.To, model.From).ToArray(); return(View(model)); }