Update MediatR and DI packages; refactor registration

Upgraded to MediatR 14.1.0 and updated registration to use the new syntax. Removed MediatR.Extensions.Microsoft.DependencyInjection where no longer needed. Bumped Microsoft.Extensions.DependencyInjection.Abstractions to 10.0.0 in Application and Infrastructure projects.
This commit is contained in:
OlgunR
2026-04-21 12:01:23 +02:00
parent 95a388015a
commit b7e66ab5f9
4 changed files with 5 additions and 5 deletions

View File

@@ -8,7 +8,8 @@ public static class DependencyInjection
public static IServiceCollection AddApplication(this IServiceCollection services)
{
services.AddAutoMapper(typeof(DependencyInjection).Assembly);
services.AddMediatR(typeof(DependencyInjection).Assembly);
services.AddMediatR(cfg =>
cfg.RegisterServicesFromAssembly(typeof(DependencyInjection).Assembly));
return services;
}
}