示例#1
0
 public IActionResult Add(Student student)
 {
     if (ModelState.IsValid)
     {
         context.AddStudent(student);
         return(RedirectToAction("Index"));
     }
     return(View(student));
 }