Files
DbFirst/DbFirst.Application/DependencyInjection.cs
OlgunR b7e66ab5f9 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.
2026-04-21 12:01:23 +02:00

16 lines
445 B
C#

using Microsoft.Extensions.DependencyInjection;
using MediatR;
namespace DbFirst.Application;
public static class DependencyInjection
{
public static IServiceCollection AddApplication(this IServiceCollection services)
{
services.AddAutoMapper(typeof(DependencyInjection).Assembly);
services.AddMediatR(cfg =>
cfg.RegisterServicesFromAssembly(typeof(DependencyInjection).Assembly));
return services;
}
}