public ImportListExclusionController(IImportListExclusionService importListExclusionService, ImportListExclusionExistsValidator importListExclusionExistsValidator, GuidValidator guidValidator) { _importListExclusionService = importListExclusionService; SharedValidator.RuleFor(c => c.ForeignId).NotEmpty().SetValidator(guidValidator).SetValidator(importListExclusionExistsValidator); SharedValidator.RuleFor(c => c.AuthorName).NotEmpty(); }
public ImportListExclusionModule(IImportListExclusionService importListExclusionService, ImportListExclusionExistsValidator importListExclusionExistsValidator) { _importListExclusionService = importListExclusionService; GetResourceById = GetImportListExclusion; GetResourceAll = GetImportListExclusions; CreateResource = AddImportListExclusion; UpdateResource = UpdateImportListExclusion; DeleteResource = DeleteImportListExclusionResource; SharedValidator.RuleFor(c => c.TvdbId).NotEmpty().SetValidator(importListExclusionExistsValidator); SharedValidator.RuleFor(c => c.Title).NotEmpty(); }