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)); }
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)); }