Esempio n. 1
0
        public ActionResult Edit(AreaConcentracaoViewModel pAreaConcentracaoViewModel)
        {
            if (ModelState.IsValid)
            {
                var lAreaConcentracao = Mapper.Map <AreaConcentracaoViewModel, AreaConcentracao>(pAreaConcentracaoViewModel);
                _areaConcentracaoAppServico.Update(lAreaConcentracao);

                return(RedirectToAction("Index"));
            }

            return(View(pAreaConcentracaoViewModel));
        }
Esempio n. 2
0
        public ActionResult Create(AreaConcentracaoViewModel pAreaConcentracao)
        {
            if (ModelState.IsValid)
            {
                var lAreaConcentracaoDomain = Mapper.Map <AreaConcentracaoViewModel, AreaConcentracao>(pAreaConcentracao);

                _areaConcentracaoAppServico.Add(lAreaConcentracaoDomain);

                return(RedirectToAction("Index"));
            }

            return(View(pAreaConcentracao));
        }