public CreatePositionCommandValidator(IPositionRepositoryAsync positionRepository) { this.positionRepository = positionRepository; RuleFor(p => p.PositionNumber) .NotEmpty().WithMessage("{PropertyName} is required.") .NotNull() .MaximumLength(50).WithMessage("{PropertyName} must not exceed 50 characters.") .MustAsync(IsUniquePositionNumber).WithMessage("{PropertyName} already exists."); RuleFor(p => p.PositionTitle) .NotEmpty().WithMessage("{PropertyName} is required.") .NotNull() .MaximumLength(50).WithMessage("{PropertyName} must not exceed 50 characters."); }
public UpdatePositionCommandHandler(IPositionRepositoryAsync positionRepository) { _positionRepository = positionRepository; }
public GetAllPositionsQueryHandler(IPositionRepositoryAsync positionRepository, IMapper mapper, IModelHelper modelHelper) { _positionRepository = positionRepository; _mapper = mapper; _modelHelper = modelHelper; }
public DeletePositionByIdCommandHandler(IPositionRepositoryAsync positionRepository) { _positionRepository = positionRepository; }
public GetPositionByIdQueryHandler(IPositionRepositoryAsync positionRepository) { _positionRepository = positionRepository; }
public CreatePositionCommandHandler(IPositionRepositoryAsync positionRepository, IMapper mapper) { _positionRepository = positionRepository; _mapper = mapper; }
public SeedPositionCommandHandler(IPositionRepositoryAsync positionRepository) { _positionRepository = positionRepository; }