using AsbCloudApp.Data; using AsbCloudApp.Services; using AsbCloudDb.Model; using AsbCloudInfrastructure.Repository; using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; namespace AsbCloudInfrastructure.Services { public class FileCategoryService : CrudCacheServiceBase, IFileCategoryService { public FileCategoryService(IAsbCloudDbContext context) : base(context) { } public async Task> GetWellCaseCategoriesAsync(CancellationToken token) { var cache = await GetCacheAsync(token) .ConfigureAwait(false); var dtos = cache .Where(kv => kv.Key >= 10000) .Where(kv => kv.Key <= 20000) .Select(kv => kv.Value); return dtos; } } }