This commit is contained in:
john 2025-05-12 09:33:07 +02:00
parent cb9d5e332e
commit baea64229b
9 changed files with 69 additions and 11 deletions

View file

@ -1,5 +1,7 @@
using Femto.Common.Infrastructure;
using Femto.Common.Infrastructure.Outbox;
using Femto.Modules.Authentication.Data;
using MediatR;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
@ -12,9 +14,7 @@ public static class AuthenticationStartup
{
var hostBuilder = Host.CreateDefaultBuilder();
hostBuilder.ConfigureServices(services => ConfigureServices(services, connectionString));
var host = hostBuilder.Build();
rootContainer.AddScoped<IAuthenticationModule>(_ => new AuthenticationModule(host));
}
@ -40,5 +40,10 @@ public static class AuthenticationStartup
{
c.RegisterServicesFromAssembly(typeof(AuthenticationStartup).Assembly);
});
services.AddTransient(
typeof(IPipelineBehavior<,>),
typeof(SaveChangesPipelineBehaviour<,>)
);
}
}