constellation-api/CH.CQRS/Command/Energy/ServiceCollectionExtension.cs

43 lines
1.7 KiB
C#
Raw Normal View History

using Microsoft.Extensions.DependencyInjection;
using OpenHarbor.CQRS.Abstractions;
using OpenHarbor.CQRS.FluentValidation;
namespace CH.CQRS.Command.Energy;
public static class ServiceCollectionExtension
{
public static IServiceCollection AddEnergyCommand(this IServiceCollection services)
{
services
2025-01-21 17:58:20 -05:00
.AddCommand<AddEnergyProviderCommand, AddEnergyProviderCommandHandler,
AddEnergyProviderCommandValidator>();
services
2025-01-21 17:58:20 -05:00
.AddCommand<AddEnergyRateCommand, AddEnergyRateCommandHandler,
AddEnergyRateCommandValidator>();
2025-01-13 19:19:03 -05:00
services
2025-01-21 17:58:20 -05:00
.AddCommand<AddEnergyRateExceptionCommand, AddEnergyRateExceptionCommandHandler,
AddEnergyRateExceptionCommandValidator>();
services
.AddCommand<DisableEnergyProviderCommand, DisableEnergyProviderCommandHandler,
DisableEnergyProviderCommandValidator>();
services
.AddCommand<DisableEnergyRateCommand, DisableEnergyRateCommandHandler,
DisableEnergyRateCommandValidator>();
2025-01-13 19:19:03 -05:00
services
.AddCommand<EnableEnergyProviderCommand, EnableEnergyProviderCommandHandler,
EnableEnergyProviderCommandValidator>();
services
.AddCommand<EnableEnergyRateCommand, EnableEnergyRateCommandHandler,
EnableEnergyRateCommandValidator>();
services
.AddCommand<UpdateEnergyProviderCommand, UpdateEnergyProviderCommandHandler,
UpdateEnergyProviderCommandValidator>();
services
.AddCommand<UpdateEnergyRateCommand, UpdateEnergyRateCommandHandler,
UpdateEnergyRateCommandValidator>();
services
.AddCommand<UpdateEnergyRateExceptionCommand, UpdateEnergyRateExceptionCommandHandler,
UpdateEnergyRateExceptionCommandValidator>();
return services;
}
}