Пример #1
0
 public CreateUserCommandHandler(IUserRepositoryAsync userRepository, IMapper mapper, IPasswordService passwordService, IUserStatusRepositoryAsync userStatusRepository)
 {
     _userRepository       = userRepository;
     _mapper               = mapper;
     _PasswordService      = passwordService;
     _userStatusRepository = userStatusRepository;
 }
 public UpdateUserCommandValidator(IUserStatusRepositoryAsync userStatusRepository)
 {
     _userStatusRepository = userStatusRepository;
     RuleFor(p => p.UserStatus)
     .NotEmpty().WithMessage("{PropertyName} is required.")
     .NotNull()
     .MustAsync(IsValidUserStatus).WithMessage("{PropertyName} not exists.");
 }
Пример #3
0
 public UpdateUserCommandHandler(IUserRepositoryAsync userRepository, IUserStatusRepositoryAsync userStatusRepository, IMapper mapper)
 {
     _userRepository       = userRepository;
     _userStatusRepository = userStatusRepository;
     _mapper = mapper;
 }