feat(core, infrastructure): UnitService - удаление/массовое удаление юнитов

This commit is contained in:
Mikhail Trubnikov
2026-06-01 16:10:00 +10:00
parent bdcc858bc5
commit d27d594e57
6 changed files with 80 additions and 7 deletions

View File

@@ -91,14 +91,21 @@ namespace PARR.API.Controllers.V1
[HttpPost(ApiRoutes.Test.CreateCache)]
public async Task<IActionResult> CreateCache([FromBody] Guid unitId)
{
var units = await unitRepository.Get().Take(100).Select(t => t.Id).ToListAsync();
var listData = await unitService.GetWithCachingAsync(units);
//var units = await unitRepository.Get().Take(100).Select(t => t.Id).ToListAsync();
//var listData = await unitService.GetWithCachingAsync(units);
//foreach(var unit in units)
//{
// //поштучно
// var unitTtt = await unitService.GetWithCachingAsync(unit);
//}
// удалить элемент
//await unitService.RemoveFromCacheAsync(Guid.Parse("79833f20-a84f-45f4-a4ed-0dae09b683d7"));
// todo: проверить удаление пачки юнитов !!!!!!!!!!!!!!!!!!!!!
//await unitService.RemoveFromCacheAsync(units);
return Ok();
//var unit = await unitService.GetWithCachingAsync(unitId);