DD.WellWorkover.Cloud/AsbCloudInfrastructure/Services/FileCategoryService.cs

32 lines
918 B
C#
Raw Normal View History

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<FileCategoryDto, FileCategory>, IFileCategoryService
{
public FileCategoryService(IAsbCloudDbContext context)
: base(context)
{
}
2022-09-13 11:47:12 +05:00
public async Task<IEnumerable<FileCategoryDto>> GetWellCaseCategoriesAsync(CancellationToken token)
{
2022-09-13 11:47:12 +05:00
var cache = await GetCacheAsync(token)
.ConfigureAwait(false);
var dtos = cache
.Where(kv => kv.Key >= 10000)
.Where(kv => kv.Key <= 20000)
.Select(kv => kv.Value);
2022-09-13 11:47:12 +05:00
return dtos;
}
}
}