Exemplo n.º 1
0
        public ActionResult EditScores()
        {
            GetRole();
            var selectList = new List <SelectListItem>();
            var allCourses = repo.GetAllCourses();

            foreach (var c in allCourses)
            {
                var selectItem = new SelectListItem();
                selectItem.Value = selectItem.Text = c;
                selectList.Add(selectItem);
            }
            ViewBag.SelectList = selectList;
            return(View());
        }