public List <SelectListItem> GetAirlinesDropDown() { List <SelectListItem> ls = new List <SelectListItem>(); var lm = airlines.Retreive(); foreach (var airline in lm) { ls.Add(new SelectListItem() { Text = airline.Name, Value = airline.AirlineId.ToString() }); } return(ls); }
// GET: Airline public ActionResult Index() { var model = db.Retreive(); return(View(model)); }