public IActionResult GetById(long id) { var item = _contaRepository.Find(id); if (item == null) { return(NotFound()); } return(new ObjectResult(item)); }
public IEnumerable <ContaViewModel> ObterTodos(Guid usuarioId) { var result = _contaRepository.Find(x => x.UsuarioId == usuarioId); return(_mapper.Map <IEnumerable <Conta>, IEnumerable <ContaViewModel> >(result)); }