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