public IActionResult StudentInfo(Student student) { if (ModelState.IsValid) { StudentViewModel svm = new StudentViewModel(); if (student.StudentId == 0) { svm.AddStudent(student); } else { svm.UpdateStudent(student); } return(RedirectToAction("Index", "Site")); } return(View()); }