public ActionResult Create(PAWARedux.Models.Type type) { if (ModelState.IsValid) { db.Types.Add(type); db.SaveChanges(); return RedirectToAction("Index"); } return View(type); }
public ActionResult Edit(PAWARedux.Models.Type type) { if (ModelState.IsValid) { db.Entry(type).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(type); }