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