Пример #1
0
        public IActionResult Add(StudentViewModel vm)
        {
            vm.SetService(_studentService);

            vm.Create();
            if (_studentService.Get(s => s.Name == vm.Name) != null)
            {
                return(RedirectToAction("Index"));
            }
            return(View(vm));
        }