コード例 #1
0
        public ActionResult Edit(Speciality speciality)
        {
            if (ModelState.IsValid)
            {
                repository.Edit(speciality);

                TempData["message"] = "Информация о специальносте успешно редактирована";

                return(RedirectToAction("Index"));
            }
            ViewBag.DepartmentId = new SelectList(db.Departments, "Id", "Name", speciality.DepartmentId);
            return(View(speciality));
        }