Пример #1
0
 public ActionResult Edit(Talent rec)
 {
     if (ModelState.IsValid)
     {
         db.Entry(rec).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Talent", "Admin");
     }
     return View(rec);
 }
Пример #2
0
        public ActionResult Create(Talent rec)
        {
            if (ModelState.IsValid)
            {
                db.Talent.Add(rec);
                db.SaveChanges();
                return RedirectToAction("Talent", "Admin");
            }

            return View(rec);
        }