public async Task <IActionResult> GetAll() { try { var retorno = await _rep.GetAll(); if (retorno.Sucesso == false) { return(BadRequest(retorno)); } return(Ok(retorno)); } catch (Exception ex) { GerarLog("Erro ao obter usuarios", ex: ex); return(StatusCode(500, ex.ToString())); } }
// GET: Filme/AddAtuacaoFilme/id public ActionResult AddAtuacaoFilme(int id) { ViewBag.Atores = Mapper.Map <IEnumerable <Ator>, ICollection <AtorModelView> >(_atorService.GetAll()); return(View(Mapper.Map <Filme, FilmeModelView>(_filmeService.GetById(id)))); }
// GET: Ator public ActionResult Index() { return(View(Mapper.Map <ICollection <Ator>, ICollection <AtorModelView> >(_atorService.GetAll()))); }