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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user