infrastructure DI
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using AipsCore.Application.Abstract;
|
||||
using AipsCore.Application.Common.Dispatcher;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace AipsCore.Infrastructure.DI;
|
||||
|
||||
public static class AipsRegistrationExtensions
|
||||
{
|
||||
public static IServiceCollection AddAips(this IServiceCollection services, IConfiguration configuration)
|
||||
{
|
||||
services.AddHandlersFromAssembly(typeof(Dispatcher).Assembly);
|
||||
services.AddSingleton<IDispatcher, Dispatcher>();
|
||||
|
||||
services.AddPersistence(configuration);
|
||||
|
||||
return services;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user