Пример #1
0
        public ActionResult Create(Pdv pdv)
        {
            if (ModelState.IsValid)
            {
                db.Pdv.Add(pdv);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(pdv);
        }
Пример #2
0
 public ActionResult Edit(Pdv pdv)
 {
     if (ModelState.IsValid)
     {
         db.Entry(pdv).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(pdv);
 }