public void CreateFundCommandValidator(IFundRepositoryAsync fundRepository) { //this.fundRepository = fundRepository; RuleFor(p => p.ISINNumber) .NotEmpty().WithMessage("{PropertyName} is required.") .NotNull() .MaximumLength(50).WithMessage("{PropertyName} must not exceed 50 characters."); //.MustAsync(IsUniqueBarcode).WithMessage("{PropertyName} already exists."); RuleFor(p => p.Url) .NotEmpty().WithMessage("{PropertyName} is required.") .NotNull() .MaximumLength(100).WithMessage("{PropertyName} must not exceed 100 characters."); }
public GetFundByIdQueryHandler(IFundRepositoryAsync fundRepository) { _fundRepository = fundRepository; }
public CreateFundCommandHandler(IFundRepositoryAsync fundRepository, IMapper mapper) { _fundRepository = fundRepository; _mapper = mapper; }
public UpdateFundCommandHandler(IFundRepositoryAsync fundRepository) { _fundRepository = fundRepository; }
public DeleteFundByIdCommandHandler(IFundRepositoryAsync fundRepository) { _fundRepository = fundRepository; }
public GetAllFundsQueryHandler(IFundRepositoryAsync fundRepository, IMapper mapper) { _fundRepository = fundRepository; _mapper = mapper; }