using ErsatzTV.Infrastructure.Data; using Microsoft.EntityFrameworkCore; namespace ErsatzTV.Application.Troubleshooting.Queries; public class DecodePlayoutHistoryHandler(IDbContextFactory dbContextFactory) : IRequestHandler { public async Task Handle( DecodePlayoutHistory request, CancellationToken cancellationToken) { await using TvContext dbContext = await dbContextFactory.CreateDbContextAsync(cancellationToken); return await PlayoutHistoryDecoder.Decode( dbContext, request.PlayoutHistory.Key, request.PlayoutHistory.Details, cancellationToken); } }