public ActionResult Create(Slide slides) { if (ModelState.IsValid) { db.Slides.Add(slides); db.SaveChanges(); return RedirectToAction("Index"); } CreateFrame(title); return View(slides); }
public ActionResult Edit(Slide slides) { if (ModelState.IsValid) { db.Entry(slides).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(slides); }