Exemple #1
0
        // GET: Class
        public ActionResult Index(long id)
        {
            var currentClass = _classesService.GetClassById(id);

            return(View(new MyViewModel
            {
                Id = currentClass.Id,
                Name = currentClass.Name,
                MonitorName = currentClass.MonitorName,
                FreeTeachers = new SelectList(_teachersService.GetTeachersNotInClass(id), "Id", "FullName")
            }));
        }