public async Task <ActionResult> Index() { try { var entidade = await _hierarchyService.GetAsync(); var model = Mapper.Map <IEnumerable <Hierarchy>, IEnumerable <HierarchyModel> >(entidade); return(View(model)); } catch (Exception e) { ShowMessageDialog(MensagensResource.ErroCarregar, e); return(RedirectToAction("Index", "Home")); } }