示例#1
0
        public ActionResult <RetornoView <Categoria> > GetAll()
        {
            var resultado = new RetornoView <Categoria>()
            {
                dados = _categoriaRepositorio.GetAll()
            };

            return(resultado);
        }
示例#2
0
        public async Task <IEnumerable <Categoria> > GetCategorias()
        {
            try
            {
                _logger.LogInformation("Buscar das categorias na base de dados.");

                return(await _categoriaRepositorio.GetAll());
            }
            catch (Exception ex)
            {
                _logger.LogError($"Erro ao buscar categorias. Detalhes: {ex.Message}");
                throw;
            }
        }
示例#3
0
 public IEnumerable <Categorias> GetAllCategorias()
 {
     return(categoria.GetAll());
 }
 public IEnumerable <Categoria> GetAll()
 {
     return(_repo.GetAll());
 }
 public IEnumerable <Categoria> GetAllCategoria()
 {
     return(repository.GetAll());
 }