public ActionResult Edit(AreaConcentracaoViewModel pAreaConcentracaoViewModel) { if (ModelState.IsValid) { var lAreaConcentracao = Mapper.Map <AreaConcentracaoViewModel, AreaConcentracao>(pAreaConcentracaoViewModel); _areaConcentracaoAppServico.Update(lAreaConcentracao); return(RedirectToAction("Index")); } return(View(pAreaConcentracaoViewModel)); }
public ActionResult Create(AreaConcentracaoViewModel pAreaConcentracao) { if (ModelState.IsValid) { var lAreaConcentracaoDomain = Mapper.Map <AreaConcentracaoViewModel, AreaConcentracao>(pAreaConcentracao); _areaConcentracaoAppServico.Add(lAreaConcentracaoDomain); return(RedirectToAction("Index")); } return(View(pAreaConcentracao)); }