Пример #1
0
 public ActionResult Edit([Bind(Include = "Id,Location,TrailCover,TrailName,Description")] Trail trail)
 {
     if (ModelState.IsValid)
     {
         db.Entry(trail).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(trail));
 }
Пример #2
0
 public void Update(T obj)
 {
     db.Entry(obj).State = EntityState.Modified;
     Save();
 }