// GET: Attendance
        public async Task <ActionResult> Index()
        {
            var courses = await _repo.GetCourses();

            List <SelectListItem> CourseDDL = courses.Select(x => new SelectListItem
            {
                Text  = x.Name,
                Value = x.Id.ToString()
            }).ToList();

            CourseDDL.Insert(0, new SelectListItem {
                Text = "All Courses", Value = "-1"
            });
            ViewBag.CourseDDL = CourseDDL;
            return(View());
        }
        // GET: Attendance/Create
        public async Task <ActionResult> Create()
        {
            AttendanceViewModel model = new AttendanceViewModel();

            //if (HttpContext.IsDebuggingEnabled)
            //{
            //    model.CourseList = new List<SelectListItem>(){
            //    new SelectListItem(){Text = "Business Administration(BBA)", Value = "1"},
            //    new SelectListItem(){Text = "Information Technology(BIT)", Value = "2"},
            //};
            //    model.SemesterList = new List<SelectListItem>(){
            //    new SelectListItem(){ Text = "Semester 1", Value = "1" },
            //    new SelectListItem(){ Text = "Semester 2", Value = "2" },
            //    new SelectListItem(){ Text = "Semester 3", Value = "3" },
            //    new SelectListItem(){ Text = "Semester 4", Value = "4" },
            //    new SelectListItem(){ Text = "Semester 5", Value = "5" },
            //    new SelectListItem(){ Text = "Semester 6", Value = "6" },
            //    new SelectListItem(){ Text = "Semester 7", Value = "7" },
            //    new SelectListItem(){ Text = "Semester 8", Value = "8" }
            //};
            //}
            //else
            //{
            var courses = await _repo.GetCourses();

            model.CourseList = courses.Select(x => new SelectListItem
            {
                Text  = x.Name,
                Value = x.Id.ToString()
            }).ToList();
            var semesters = await _repo.GetSemesters();

            model.SemesterList = semesters.Select(x => new SelectListItem
            {
                Text  = x.Name,
                Value = x.Id.ToString()
            }).ToList();
            //}

            model.ClassList = new List <SelectListItem>();

            return(View(model));
        }