示例#1
0
 public ActionResult Edit([Bind(Include = "Id,Name")] BusCompany busCompany)
 {
     if (ModelState.IsValid)
     {
         db.Entry(busCompany).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(busCompany));
 }
 public ActionResult Edit([Bind(Include = "Id,From,To,Price,Distance")] Destination destination)
 {
     if (ModelState.IsValid)
     {
         db.Entry(destination).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(destination));
 }