コード例 #1
0
        public ActionResult Edit(int id, LocalModel localModel)
        {
            if (ModelState.IsValid)
            {
                var local = _mapper.Map <Local>(localModel);

                local.IdLocal = id;
                _localService.Atualizar(local);
            }
            return(RedirectToAction(nameof(Index)));
        }
コード例 #2
0
        public LocalViewModel Atualizar(LocalViewModel LocalViewModel)
        {
            var localAtualizado = _LocalService.Atualizar(Mapper.Map <Local>(LocalViewModel));

            return(Mapper.Map <LocalViewModel>(localAtualizado));
        }