public IActionResult Edit(int id,Student student)
 {
     var s = DB.Students
         .Where(x => x.Id == id)
         .SingleOrDefault();
     if (s == null)
         return Content("没有找到该记录");
     s.Name = student.Name;
     s.Sex = student.Sex;
     s.Age = student.Age;
     s.Class = student.Class;
     s.Address = student.Address;
     DB.SaveChanges();
     return RedirectToAction("Index", "Home");
 }
 public IActionResult Create(Student Student)
 {
     DB.Students.Add(Student);
     DB.SaveChanges();
     return RedirectToAction("Details", "Admin");
 }