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