Пример #1
0
        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);
        }
Пример #2
0
 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);
 }