public IActionResult Get() { try { return(Json(_bancoRepository.ObterTodos())); } catch (Exception ex) { return(BadRequest(ex.ToString())); } }
public async Task <IActionResult> BuscarTodosBancos() { try { var listaBancos = await _bancoRepository.ObterTodos(); return(Response(listaBancos)); } catch (Exception ex) { return(ResponseErro(ex)); } }
public IActionResult Get() { try { return(Ok(_bancoRepository.ObterTodos())); //if (true) //{ // return BadRequest(); //} } catch (Exception ex) { return(BadRequest(ex.ToString())); } }
public IEnumerable <BancoViewModel> ObterTodos() { return(_mapper.Map <IEnumerable <BancoViewModel> >(_bancoRepository.ObterTodos())); }