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