public TaxClassViewModelValidator(ITaxClassService taxClassService) { RuleFor(r => r.Name).NotEmpty(); RuleFor(r => r).Must( r => !taxClassService.FindAll().Any(d => d.Id != r.Id && d.Name == r.Name)) .WithName("Name") .WithMessage("Name is already used".TA()); }
public TaxRateController(ITaxRateService taxRateService, ITaxZoneService taxZoneService, ITaxClassService taxClassService, ISettingService settingService) { this.taxRateService = taxRateService; this.taxZoneService = taxZoneService; this.taxClassService = taxClassService; this.settingService = settingService; }
public ProductController(DataContext db, IProductFinder productFinder, IDeleterService deleterService, IProductService productService, ITaxClassService taxClassService, ISettingService settingService) : base(db) { this.productFinder = productFinder; this.deleterService = deleterService; this.productService = productService; this.taxClassService = taxClassService; this.settingService = settingService; }
public TaxClassController(ITaxClassService taxClassService) { this.taxClassService = taxClassService; }