コード例 #1
0
        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);
        }
コード例 #2
0
        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));
        }
コード例 #4
0
 // GET: api/Endereco
 public async Task <IEnumerable <Endereco> > Get()
 {
     return(await enderecoRepository.Get());
 }