예제 #1
0
        public IList <CarrierData> Map(Notification source)
        {
            var carrierCollection = Task.Run(() => repository.GetByNotificationId(source.Id)).Result;

            return(carrierCollection.Carriers.Select(c => new CarrierData
            {
                Address = addressMap.Map(c.Address),
                Business = businessMap.Map(c.Business),
                Contact = contactMap.Map(c.Contact),
                Id = c.Id,
                NotificationId = source.Id
            }).ToList());
        }
예제 #2
0
        public IList <FacilityData> Map(Notification source)
        {
            var facilityCollection = Task.Run(() => facilityRepository.GetByNotificationId(source.Id)).Result;

            return(facilityCollection.Facilities.Select(f => new FacilityData
            {
                Address = addressMap.Map(f.Address),
                Business = businessMap.Map(f.Business),
                Contact = contactMap.Map(f.Contact),
                Id = f.Id,
                NotificationId = source.Id,
                IsActualSiteOfTreatment = f.IsActualSiteOfTreatment
            }).ToList());
        }
예제 #3
0
        public IList <ProducerData> Map(Notification source)
        {
            var producerCollection = Task.Run(() => producerRepository.GetByNotificationId(source.Id)).Result;

            return(producerCollection.Producers.Select(p => new ProducerData
            {
                Address = addressMap.Map(p.Address),
                Business = businessMap.Map(p.Business),
                Contact = contactMap.Map(p.Contact),
                Id = p.Id,
                IsSiteOfExport = p.IsSiteOfExport,
                NotificationId = source.Id
            }).ToList());
        }