public ActionResult Create(Region model)
 {
     if (ModelState.IsValid)
     {
         db.Regions.Add(model);
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View();
 }
 public ActionResult Edit(Region model)
 {
     try
     {
         Region region = db.Regions.Find(model.RegionID);
         UpdateModel(region);
         db.SaveChanges();
         return RedirectToAction("Details", new { id = model.RegionID });
     }
     catch
     {
         ModelState.AddModelError("", "修改错误!");
         return View();
     }
 }