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