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