public ActionResult Create(ImagesAlbum imagesalbum) { if (ModelState.IsValid) { db.ImagesAlbum.Add(imagesalbum); db.SaveChanges(); return RedirectToAction("Index"); } return View(imagesalbum); }
public ActionResult Edit(ImagesAlbum imagesalbum) { if (ModelState.IsValid) { db.Entry(imagesalbum).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(imagesalbum); }