public async Task <IEnumerable <T> > GetByCategoryAsync <T>(CategoryOfGuide categoryName, int take, int skip = 0) => await this.repository.All() .Where(x => x.Category == categoryName) .OrderByDescending(x => x.CreatedOn) .Skip(skip) .Take(take) .To <T>() .ToListAsync();
public async Task <int> GetCountByCategoryAsync(CategoryOfGuide categoryName) => await this.repository.All() .Where(x => x.Category == categoryName) .CountAsync();