constellation-api/CH.CQRS/QueryModule.cs

26 lines
925 B
C#

using CH.CQRS.Query.Health;
using Microsoft.Extensions.DependencyInjection;
using OpenHarbor.CQRS.Abstractions;
using PoweredSoft.Module.Abstractions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CH.CQRS.Query.EnergyProvider;
using CH.CQRS.Query.EnergyRate;
using CH.CQRS.Query.EnergyRateException;
namespace CH.CQRS;
public class QueryModule : IModule
{
public IServiceCollection ConfigureServices(IServiceCollection services)
{
services.AddQuery<HealthQuery, HealthQueryResult, HealthQueryHandler>();
services.AddQuery<EnergyProviderQuery, EnergyProviderQueryResult, EnergyProviderQueryHandler>();
services.AddQuery<EnergyRateQuery, EnergyRateQueryResult, EnergyRateQueryHandler>();
services.AddQuery<EnergyRateExceptionQuery, EnergyRateExceptionQueryResult, EnergyRateExceptionQueryHandler>();
return services;
}
}