Example #1
0
        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;
 }
Example #3
0
 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;
 }