public async Task<Autor> GetAutorByName(string name)
        {
            if (!_collection.Any())
            {
                var compartimossService = new CompartiService();
                _collection = await compartimossService.SearchAuthors();
                using (var redisClient = new RedisClient("dockerdotnetencamina.westus.cloudapp.azure.com", 6379))
                {
                    redisClient.StoreAll(_collection);
                }
            }
            return _collection.Where(x => x.Name.Equals(name)).FirstOrDefault();

        }
 public async Task<Revista> GetRevistaByTitle(string name)
 {
     if (_repository == null)
     {
         var compartimossService = new CompartiService();
         _repository = await compartimossService.SearchNumbers();
         using (var redisClient = new RedisClient("dockerdotnetencamina.westus.cloudapp.azure.com", 6379))
         {
             redisClient.Set<IEnumerable<Revista>>("revista", _repository);
             //redisClient.StoreAll(_repository);
         }
     }
     return _repository.Where(x => x.Numero.Equals(name)).FirstOrDefault();
 }
 public async  Task<IEnumerable<Revista>> GetRevistas()
 {
     if (_repository==null)
     {
         var compartimossService = new CompartiService();
         _repository = await compartimossService.SearchNumbers();
         using (var redisClient = new RedisClient("dockerdotnetencamina.westus.cloudapp.azure.com", 6379))
         {
             //   redisClient.StoreAll(_repository);
             redisClient.Set<IEnumerable<Revista>>("revista", _repository);
         }
     }
     return _repository;
 }
        public async Task<IEnumerable<Autor>> GetAllAutor()
        {
            if (!_collection.Any())
            {
                var compartimossService = new CompartiService();
                _collection = await compartimossService.SearchAuthors();
                using (var redisClient = new RedisClient("dockerdotnetencamina.westus.cloudapp.azure.com", 6379))
                {
                    redisClient.StoreAll(_collection);
                }
            }

            return _collection;


        }
 public async Task<IEnumerable<Articulos>> GetArticulosByRevista(string revista)
 {
     var compartimossService = new CompartiService();
     _repository = await compartimossService.SearchArticles(revista);
     return _repository.Where(x=>x.NumeroRevista.Equals(revista));
 }
 public async Task<IEnumerable<Articulos>> GetArticulosByAutor(string autor)
 {
     var compartimossService = new CompartiService();
     _repository = await compartimossService.SearchArticlesByAutor(autor);
     return _repository;
 }