public GetUserQueryHandler( IMapper mapper, IPlagiarismCheckerDbContext plagiarismCheckerDbContext ) { this._mapper = mapper; this._plagiarismCheckerDbContext = plagiarismCheckerDbContext; }
public GetUserSearchHistoryQueryHandler( IPlagiarismCheckerDbContext plagiarismCheckerDbContext, IMapper mapper ) { this._plagiarismCheckerDbContext = plagiarismCheckerDbContext; this._mapper = mapper; }
public CheckTextForPlagiarismForUserCommandHandler( IRequestHandler <CheckTextForPlagiarismCommand, CheckTextForPlagiarismDto> checkTextForPlagiarism, IMapper mapper, IPlagiarismCheckerDbContext plagiarismCheckerDbContext, IDateTime dateTime ) { this._checkTextForPlagiarism = checkTextForPlagiarism; this._mapper = mapper; this._plagiarismCheckerDbContext = plagiarismCheckerDbContext; this._dateTime = dateTime; }
public CheckTextForPlagiarismForUserCommandValidator( IPlagiarismCheckerDbContext plagiarismCheckerDbContext ) { this._plagiarismCheckerDbContext = plagiarismCheckerDbContext; RuleFor(x => x.Username) .NotEmpty().WithMessage("Username must not be empty!") .MustAsync(UserNotExists).WithMessage("The specified username does not exists!"); RuleFor(x => x.TextToCheck) .NotEmpty().WithMessage("TextToCheck must not be empty!"); }
public LoginUserCommandValidator( IPlagiarismCheckerDbContext plagiarismCheckerDbContext ) { this._plagiarismCheckerDbContext = plagiarismCheckerDbContext; RuleFor(x => x.Username) .NotEmpty().WithMessage("Username must not be empty!") .MustAsync(UserNotExists).WithMessage("The specified username does not exists!"); RuleFor(x => x.Password) .NotEmpty().WithMessage("Password must not be empty!"); }
public AddUserCommandValidator( IPlagiarismCheckerDbContext plagiarismCheckerDbContext ) { this._plagiarismCheckerDbContext = plagiarismCheckerDbContext; RuleFor(x => x.Name) .NotEmpty().WithMessage("Name must not be empty!"); RuleFor(x => x.Surname) .NotEmpty().WithMessage("Surname must not be empty!"); RuleFor(x => x.Username) .NotEmpty().WithMessage("Username must not be empty!") .MustAsync(BeUniqueUsername).WithMessage("The specified username already exists!"); RuleFor(x => x.Password) .NotEmpty().WithMessage("Password must not be empty!"); }
public LoginUserCommandHandler( IPlagiarismCheckerDbContext plagiarismCheckerDbContext ) { this._plagiarismCheckerDbContext = plagiarismCheckerDbContext; }