public ActionResult Edit(LeadStatusViewModel leadStatus) { if (ModelState.IsValid) { var entity = Mapper.Map <LeadStatus>(leadStatus); leadStatusService.Update(entity); return(RedirectToAction("Index")); } return(View(leadStatus)); }
// GET: LeadStatus/Edit/5 public ActionResult Edit(Guid?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } LeadStatusViewModel leadStatus = Mapper.Map <LeadStatusViewModel>(leadStatusService.Get (id.Value)); if (leadStatus == null) { return(HttpNotFound()); } return(View(leadStatus)); }