Ejemplo n.º 1
0
 public ActionResult Edit(Post post)
 {
     if (ModelState.IsValid)
     {
         db.Entry(post).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Administration"));
     }
     return(View(post));
 }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "FanId,FName,LName,Genre,BDate,Seniority")] Fan fan)
 {
     if (ModelState.IsValid)
     {
         db.Entry(fan).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(fan));
 }