public ActionResult Create(JobFormModel model) { var item = Mapper.Map<JobFormModel, Job>(model); GetSession.Save(item); return RedirectToAction("Index"); }
public ActionResult Edit(JobFormModel model) { if (ModelState.IsValid) { var item = GetSession.Get<Job>(model.Id); Mapper.Map<JobFormModel, Job>(model, item); GetSession.Update(item); return RedirectToAction("Index"); } return View(model); }
public ActionResult Create() { var model = new JobFormModel(); return View(model); }