Ejemplo n.º 1
0
        public void Clean()
        {
            var authors = _authorRepository.All().ToList();

            authors.ForEach(s =>
            {
                var cleanName = s.Name.CleanAuthorName();
                if (s.CleanName != cleanName)
                {
                    s.CleanName = cleanName;
                    _authorRepository.Update(s);
                }
            });
        }
Ejemplo n.º 2
0
 public List <Author> GetAllAuthors()
 {
     return(_cache.Get("GetAllAuthors", () => _authorRepository.All().ToList(), TimeSpan.FromSeconds(30)));
 }
Ejemplo n.º 3
0
 public IEnumerable <Author> Get()
 {
     return(_authorRepository.All());
 }