コード例 #1
0
        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);
        }
コード例 #2
0
        public IActionResult Index()
        {
            var parks = _parkDal.GetParks();

            return(View(parks));
        }
コード例 #3
0
        // GET: Home
        public ActionResult Index()
        {
            List <Park> parks = parkDal.GetParks();

            return(View("Index", parks));
        }