public async Task <IEnumerable <Artigo> > ObterUltimasPublicacoes(BlogEnum blog) { return(await FindAll() .Where(filtro => filtro.AQualBlogPertence.Equals(blog.ToString())) .Take(5) .ToListAsync()); }
public async Task <IEnumerable <Artigo> > ObterTodos(int page, int quantity, BlogEnum blog) { return(await FindAll() .Where(filtro => filtro.AQualBlogPertence.Equals(blog.ToString())) .OrderByDescending(filtro => filtro.DataPublicacao) .Skip((page - 1) * quantity) .Take(quantity) .ToListAsync()); }