Esempio n. 1
0
        public ActionResult Create(Skill skill)
        {
            if (ModelState.IsValid)
            {
                db.Skills.Add(skill);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(skill);
        }
Esempio n. 2
0
 public ActionResult Edit(Skill skill)
 {
     if (ModelState.IsValid)
     {
         db.Entry(skill).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(skill);
 }