Пример #1
0
        public JsonResult SelecionarEnderecos(int id)
        {
            var todosEnderecosViewModel = Mapper.Map <IEnumerable <Endereco>, IEnumerable <EnderecoViewModel> >(_enderecoAppServico.ObterTodos());
            var enderecoViewModel       = todosEnderecosViewModel.Where(e => e.MunicipioId == id).ToList();

            return(Json(enderecoViewModel, JsonRequestBehavior.AllowGet));
        }
Пример #2
0
        public ActionResult Index()
        {
            var enderecoViewModel = Mapper.Map <IEnumerable <Endereco>, IEnumerable <EnderecoViewModel> >(_enderecoAppServico.ObterTodos());

            return(View(enderecoViewModel));
        }