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