public RunsValidator( IBRSConfigurationTemplateRepository brsConfigurationTemplateRepository, ITenantSettingsRepository tenantSettingsRepository, IRunRepository runRepository, IScenarioRepository scenarioRepository, ISalesAreaRepository salesAreaRepository, ICampaignRepository campaignRepository, IDemographicRepository demographicRepository, IDeliveryCappingGroupRepository deliveryCappingGroupRepository, IFeatureManager featureManager, IRunTypeRepository runTypeRepository, IAnalysisGroupRepository analysisGroupRepository, IMapper mapper ) { _brsConfigurationTemplateRepository = brsConfigurationTemplateRepository; _tenantSettingsRepository = tenantSettingsRepository; _runRepository = runRepository; _scenarioRepository = scenarioRepository; _salesAreaRepository = salesAreaRepository; _campaignRepository = campaignRepository; _demographicRepository = demographicRepository; _deliveryCappingGroupRepository = deliveryCappingGroupRepository; _featureManager = featureManager; _runTypeRepository = runTypeRepository; _analysisGroupRepository = analysisGroupRepository; _mapper = mapper; }
public static DeliveryCappingGroupValidation GetValidation(IDeliveryCappingGroupRepository repository) { return(new DeliveryCappingGroupValidation(x => { var existingEntity = repository.GetByDescription(x.Description); return existingEntity == null || existingEntity.Id == x.Id; })); }
public DeliveryCappingGroupController( IDeliveryCappingGroupRepository repository, IRunRepository runRepository, IModelDataValidator <DeliveryCappingGroupModel> validator, IMapper mapper ) { _repository = repository; _validator = validator; _mapper = mapper; _runRepository = runRepository; }