public ActionResult Index() { List<Park> parks = parkDal.GetParks(); Survey model = new Survey(); foreach (Park p in parks) { model.Parks.Add(new SelectListItem() { Text = p.Name, Value = p.Code }); } return View("Survey",model); }
public IActionResult Index() { var parks = _parkDal.GetParks(); return(View(parks)); }
// GET: Home public ActionResult Index() { List <Park> parks = parkDal.GetParks(); return(View("Index", parks)); }