Files
lux/EgwCoreLib.Lux.Data/Services/Job/PhaseService.cs
T
Samuele E. Locatelli (W11-AI) a17a586ddb COmpleto review doc interfacce
2026-03-25 14:02:28 +01:00

42 lines
1.1 KiB
C#

namespace EgwCoreLib.Lux.Data.Services.Job
{
public class PhaseService : BaseServ, IPhaseService
{
#region Public Constructors
public PhaseService(
IConfiguration config,
IConnectionMultiplexer redis,
IPhaseRepository repo) : base(config, redis)
{
_className = "Phase";
_repo = repo;
}
#endregion Public Constructors
#region Public Methods
/// <inheritdoc />
public async Task<List<PhaseModel>> GetAllAsync()
{
return await TraceAsync($"{_className}.GetAll", async (activity) =>
{
return await GetOrSetCacheAsync(
$"{_redisBaseKey}:{_className}:ALL",
async () => await _repo.GetAllAsync(),
UltraLongCache
);
});
}
#endregion Public Methods
#region Private Fields
private readonly string _className;
private readonly IPhaseRepository _repo;
#endregion Private Fields
}
}