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