常用方法
常用方法
常用方法
常用方法
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)); }