feat(udt-001): application layer with LoginCommandHandler and ports
This commit is contained in:
20
src/api/SIGCM2.Application/DependencyInjection.cs
Normal file
20
src/api/SIGCM2.Application/DependencyInjection.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using FluentValidation;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using SIGCM2.Application.Abstractions;
|
||||
using SIGCM2.Application.Auth.Login;
|
||||
|
||||
namespace SIGCM2.Application;
|
||||
|
||||
public static class DependencyInjection
|
||||
{
|
||||
public static IServiceCollection AddApplication(this IServiceCollection services)
|
||||
{
|
||||
// Register command handlers
|
||||
services.AddScoped<ICommandHandler<LoginCommand, LoginResponseDto>, LoginCommandHandler>();
|
||||
|
||||
// Register FluentValidation validators from this assembly
|
||||
services.AddValidatorsFromAssemblyContaining<LoginCommandValidator>();
|
||||
|
||||
return services;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user