public ActionResult Edit(Theme theme) { if (ModelState.IsValid) { context.Entry(theme).State = EntityState.Modified; context.SaveChanges(); return RedirectToAction("Index","Home"); } return View(theme); }
public ActionResult Create(Theme theme) { if (ModelState.IsValid) { context.Themes.Add(theme); context.SaveChanges(); return RedirectToAction("Index","Home"); } return View(theme); }