public ActionResult Edit([Bind(Include = "Id,Photo,Title")] PhotoArea photoArea) { if (ModelState.IsValid) { db.Entry(photoArea).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(photoArea)); }
public ActionResult Edit([Bind(Include = "Id,Photo,NavItem")] HeaderContent headerContent) { if (ModelState.IsValid) { db.Entry(headerContent).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(headerContent)); }
public ActionResult Edit([Bind(Include = "Id,Title,Content,Date,BigContent")] MainContent mainContent) { if (ModelState.IsValid) { db.Entry(mainContent).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(mainContent)); }
public ActionResult Edit([Bind(Include = "Id,MainTitle,Title,Content,Icon")] CardBody cardBody) { if (ModelState.IsValid) { db.Entry(cardBody).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(cardBody)); }
public ActionResult Edit([Bind(Include = "Id,Icon,Name")] AmazingFeatures amazingFeatures) { if (ModelState.IsValid) { db.Entry(amazingFeatures).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(amazingFeatures)); }
public ActionResult Edit(Page page) { page.BackgroundImageId = db.Images.FirstOrDefault(p => p.Path == page.BackgroundImage.Path).Id; page.BackgroundImage = null; db.Entry(page).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Pages")); }