public BudgetItemTypeServices( IBudgetItemTypeRepository repository, Lazy <SaveBudgetItemTypeValidator> lazySaveValidator) { _repository = repository; _lazySaveValidator = lazySaveValidator; }
public SaveBudgetItemTypeValidator(IBudgetItemTypeRepository repository) { RuleFor(e => e.Name).NotEmpty().WithErrorMessage(Errors.NameRequired()); RuleFor(e => e.Name).CustomAsync(MustBeUniqueAsync); _repository = repository; }