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

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