private static void SetupMediatR(IServiceCollection AServices) { AServices.AddMediatR(AOption => AOption.AsScoped(), typeof(TemplateHandler <IRequest, Unit>).GetTypeInfo().Assembly); AServices.AddScoped(typeof(IPipelineBehavior <,>), typeof(LoggingBehaviour <,>)); AServices.AddScoped(typeof(IPipelineBehavior <,>), typeof(FluentValidationBehavior <,>)); }