public ActionResult Create(Job job) { try { if (!ModelState.IsValid) return View(job); new JobService().Add(job); return RedirectToAction("Index"); } catch { return View(job); } }
partial void DeleteJob(Job instance);
partial void UpdateJob(Job instance);
partial void InsertJob(Job instance);
public ActionResult Edit(int id, Job job) { try { new JobService().Update(id, job); // TODO: Add update logic here return RedirectToAction("Index"); } catch { return View(); } }