public BulkStandardDayPartGroupCreatedEventHandler(
     IStandardDayPartGroupRepository standardDayPartGroupRepository,
     IStandardDayPartRepository standardDayPartRepository,
     ISalesAreaRepository salesAreaRepository,
     IDemographicRepository demographicRepository,
     IMapper mapper)
 {
     _standardDayPartGroupRepository = standardDayPartGroupRepository;
     _standardDayPartRepository      = standardDayPartRepository;
     _salesAreaRepository            = salesAreaRepository;
     _demographicRepository          = demographicRepository;
     _mapper = mapper;
 }
Beispiel #2
0
        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));
            }
        }
Beispiel #3
0
 public BulkStandardDayPartDeletedEventHandler(IStandardDayPartRepository standardDayPartRepository)
 {
     _standardDayPartRepository = standardDayPartRepository;
 }
 public BulkStandardDayPartCreatedEventHandler(IStandardDayPartRepository standardDayPartRepository, ISalesAreaRepository salesAreaRepository, IMapper mapper)
 {
     _standardDayPartRepository = standardDayPartRepository;
     _salesAreaRepository       = salesAreaRepository;
     _mapper = mapper;
 }
Beispiel #5
0
 public StandardDayPartResultChecker(ITestDataImporter testDataImporter, IStandardDayPartRepository standardDayPartRepository) : base(testDataImporter)
 {
     _standardDayPartRepository = standardDayPartRepository;
 }