public ActionResult Create(Skill skill) { if (ModelState.IsValid) { db.Skills.Add(skill); db.SaveChanges(); return RedirectToAction("Index"); } return View(skill); }
public ActionResult Edit(Skill skill) { if (ModelState.IsValid) { db.Entry(skill).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(skill); }