Example #1
0
        public IActionResult AddSubject(SubjectModel model)
        {
            if (ModelState.IsValid)
            {
                SubjectManager.CreateNewSubject(model.SubjectName);

                return(RedirectToAction(nameof(SubjectIndex)));
            }

            return(View(model));
        }