Пример #1
0
        public ActionResult AddClass(AddClass classInfo)
        {
            if (ModelState.IsValid)
            {
                var dto = classInfo.CreateClassFromUIModel();
                dto.UserID = User.Identity.GetUserId();
                _teacherRepository.AddClass(dto);
                return(RedirectToAction("Index"));
            }

            return(View(classInfo));
        }