//
        // GET: /Season/

        public ActionResult Index()
        {
            IList <Season> seasons = seasondao.GetAll();

            ViewBag.Seasons = seasons;
            return(View());
        }
Esempio n. 2
0
        public IEnumerable <SelectListItem> Seasons()
        {
            IList <SelectListItem> items   = new List <SelectListItem>();
            IList <Season>         seasons = seasondao.GetAll();

            foreach (Season s in seasons)
            {
                items.Add(new SelectListItem
                {
                    Value = s.Id.ToString(),
                    Text  = s.Value
                });
            }
            ;

            return(items);
        }