public List <EnderecoModel> Get(string name = null) { EnderecoRepository enderecoRepository; List <EnderecoModel> enderecos; try { enderecoRepository = new EnderecoRepository(_loggerFactory, _config); enderecos = enderecoRepository.Get(name); } catch (Exception ex) { throw ex; } return(enderecos); }
public EnderecoModel Get(int id) { EnderecoRepository enderecoRepository; EnderecoModel endereco; try { enderecoRepository = new EnderecoRepository(_loggerFactory, _config); endereco = enderecoRepository.Get(id); } catch (Exception ex) { throw ex; } return(endereco); }
public IHttpActionResult Get() { var dados = _repository.Get(Convert.ToInt32(User.Identity.Name)); return(Ok(dados)); }
// GET: api/Endereco public async Task <IEnumerable <Endereco> > Get() { return(await enderecoRepository.Get()); }