In progress
This commit is contained in:
@@ -30,8 +30,12 @@ public static class ModuleExtensions
|
||||
services.AddScoped<IProjectRepository, ProjectRepository>();
|
||||
services.AddScoped<IUnitOfWork, UnitOfWork>();
|
||||
|
||||
// Register MediatR handlers from Application assembly
|
||||
services.AddMediatR(typeof(CreateProjectCommand).Assembly);
|
||||
// Register MediatR handlers from Application assembly (v13.x syntax)
|
||||
services.AddMediatR(cfg =>
|
||||
{
|
||||
cfg.LicenseKey = configuration["MediatR:LicenseKey"];
|
||||
cfg.RegisterServicesFromAssembly(typeof(CreateProjectCommand).Assembly);
|
||||
});
|
||||
|
||||
// Register FluentValidation validators
|
||||
services.AddValidatorsFromAssembly(typeof(CreateProjectCommand).Assembly);
|
||||
|
||||
Reference in New Issue
Block a user