Skip to content

Commit

Permalink
update mediatr
Browse files Browse the repository at this point in the history
  • Loading branch information
HaikAsatryan committed May 14, 2024
1 parent b9d4e4c commit daea553
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ public static WebApplicationBuilder AddMediatrWithBehaviors(this WebApplicationB
{
var assembly = typeof(Program).Assembly;
builder.Services.AddMediatR(cfg => cfg.RegisterServicesFromAssembly(assembly));
builder.Services.AddScoped(typeof(IPipelineBehavior<,>), typeof(LoggingBehavior<,>));
builder.Services.AddScoped(typeof(IPipelineBehavior<,>), typeof(ValidationBehaviorWithoutResponse<,>));
builder.Services.AddScoped(typeof(IPipelineBehavior<,>), typeof(ValidationBehaviorWithResponse<,>));
builder.Services.AddScoped(typeof(IPipelineBehavior<,>), typeof(LoggingBehavior<,>));
builder.Services.AddValidatorsFromAssembly(assembly);
return builder;
}
Expand Down

0 comments on commit daea553

Please sign in to comment.