2022-09-05 09:13:45 +05:00
|
|
|
|
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-05 09:13:45 +05:00
|
|
|
|
{
|
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-08 12:05:56 +05:00
|
|
|
|
|
2022-09-13 11:47:12 +05:00
|
|
|
|
return dtos;
|
2022-09-08 12:05:56 +05:00
|
|
|
|
}
|
2022-09-05 09:13:45 +05:00
|
|
|
|
}
|
|
|
|
|
}
|