Exemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "Id,Email,Password")] Login login)
 {
     if (ModelState.IsValid)
     {
         db.Entry(login).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(login));
 }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "Id,Header,Text")] News news)
 {
     if (ModelState.IsValid)
     {
         db.Entry(news).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(news));
 }