Browse Source

fix constructor injection for _validators

pull/1809/head
A-Soltani 3 years ago
parent
commit
f7a3aaec54
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/Services/Ordering/Ordering.API/Application/Behaviors/ValidatorBehavior.cs

+ 2
- 2
src/Services/Ordering/Ordering.API/Application/Behaviors/ValidatorBehavior.cs View File

@ -3,9 +3,9 @@
public class ValidatorBehavior<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse>
{
private readonly ILogger<ValidatorBehavior<TRequest, TResponse>> _logger;
private readonly IValidator<TRequest>[] _validators;
private readonly IEnumerable<IValidator<TRequest>> _validators;
public ValidatorBehavior(IValidator<TRequest>[] validators, ILogger<ValidatorBehavior<TRequest, TResponse>> logger)
public ValidatorBehavior(IEnumerable<IValidator<TRequest>> validators, ILogger<ValidatorBehavior<TRequest, TResponse>> logger)
{
_validators = validators;
_logger = logger;


Loading…
Cancel
Save