public BulkStandardDayPartGroupCreatedEventHandler( IStandardDayPartGroupRepository standardDayPartGroupRepository, IStandardDayPartRepository standardDayPartRepository, ISalesAreaRepository salesAreaRepository, IDemographicRepository demographicRepository, IMapper mapper) { _standardDayPartGroupRepository = standardDayPartGroupRepository; _standardDayPartRepository = standardDayPartRepository; _salesAreaRepository = salesAreaRepository; _demographicRepository = demographicRepository; _mapper = mapper; }
public static void ValidateDayParts(this IStandardDayPartRepository repository, IReadOnlyCollection <int> externalIds) { if (repository is null) { throw new ArgumentNullException(nameof(repository)); } var existingDayParts = repository.FindByExternal(externalIds.ToList()); var invalidExternalRefs = externalIds.Except(existingDayParts.Select(s => s.DayPartId)).ToList(); if (invalidExternalRefs.Any()) { throw new DataSyncException(DataSyncErrorCode.DayPartNotFound, "Invalid DayParts: " + string.Join(",", invalidExternalRefs)); } }
public BulkStandardDayPartDeletedEventHandler(IStandardDayPartRepository standardDayPartRepository) { _standardDayPartRepository = standardDayPartRepository; }
public BulkStandardDayPartCreatedEventHandler(IStandardDayPartRepository standardDayPartRepository, ISalesAreaRepository salesAreaRepository, IMapper mapper) { _standardDayPartRepository = standardDayPartRepository; _salesAreaRepository = salesAreaRepository; _mapper = mapper; }
public StandardDayPartResultChecker(ITestDataImporter testDataImporter, IStandardDayPartRepository standardDayPartRepository) : base(testDataImporter) { _standardDayPartRepository = standardDayPartRepository; }