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); } }); }
public List <Author> GetAllAuthors() { return(_cache.Get("GetAllAuthors", () => _authorRepository.All().ToList(), TimeSpan.FromSeconds(30))); }
public IEnumerable <Author> Get() { return(_authorRepository.All()); }