using CH.Dal; using Microsoft.EntityFrameworkCore; using OpenHarbor.CQRS.Abstractions; namespace CH.CQRS.Query.EnergyRateException; public class EnergyRateExceptionQuery { } public class EnergyRateExceptionQueryHandler(CHDbContext dbContext) : IQueryHandler { public async Task HandleAsync(EnergyRateExceptionQuery query, CancellationToken cancellationToken = new CancellationToken()) { var energyRateExceptions = await dbContext.EnergyRateExceptions.ToListAsync(cancellationToken); var energyRateExceptionsQueryResult = new EnergyRateExceptionQueryResult { Data = energyRateExceptions, }; return energyRateExceptionsQueryResult; } }