Exemple #1
0
        public ActionResult Create()
        {
            var model = new CourseOfferingDetailsViewModel
            {
                Courses     = _courseService.GetCourses(c => c.IsActive).ToSelectListItems(c => c.Title, c => c.Id.ToString()),
                Rooms       = _roomService.GetAllRooms().ToSelectListItems(r => r.Name, r => r.Id.ToString()),
                Instructors = _instructorService.GetActiveInstructors().ToSelectListItems(i => i.FullName, i => i.Id.ToString()),
            };

            return(View(model));
        }