using CH.CQRS.Service.Energy; using OpenHarbor.CQRS.Abstractions; namespace CH.CQRS.Command.Energy; public class EnableEnergyRateCommand { public long RateId { get; set; } } public class EnableEnergyRateCommandHandler(EnergyService energyService) : ICommandHandler { public Task HandleAsync(EnableEnergyRateCommand command, CancellationToken cancellationToken = new CancellationToken()) { return energyService.EnableEnergyRateAsync(new EnableEnergyRateCommandOptions { RateId = command.RateId }, cancellationToken); } }