public GenreService(
     IEntityRepository <Genre> genreRepository
     ,
     FluentValidation.IValidatorFactory validatorFactory
     ,
     IMappingEngine mapper
     )
 {
     _genreRepository = genreRepository;
     _hasPermission   = validatorFactory.GetValidator <Genre>();
     _mapper          = mapper;
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FluentValidationValidatorProvider"/> class.
 /// </summary>
 /// <param name="factory">The <see cref="FV.IValidatorFactory"/> used.</param>
 public FluentValidationValidatorProvider(FV.IValidatorFactory factory)
 {
     Ensure.Arg.NotNull(factory, nameof(factory));
     _factory = factory;
 }