public async Task <ProducerData> HandleAsync(GetProducerForNotification message)
        {
            var producers = await repository.GetByNotificationId(message.NotificationId);

            var producer = producers.GetProducer(message.ProducerId);

            return(mapper.Map(producer, message.NotificationId));
        }
        public async Task <CarrierData> HandleAsync(GetCarrierForNotification message)
        {
            var carriers = await repository.GetByNotificationId(message.NotificationId);

            var carrier = carriers.GetCarrier(message.CarrierId);

            return(mapper.Map(carrier, message.NotificationId));
        }
        public async Task <FacilityData> HandleAsync(GetFacilityForNotification message)
        {
            var facilityCollection = await facilityRepository.GetByNotificationId(message.NotificationId);

            var facility = facilityCollection.GetFacility(message.FacilityId);

            return(mapper.Map(facility, message.NotificationId));
        }
Ejemplo n.º 4
0
        public async Task <ExporterData> HandleAsync(GetExporterByNotificationId message)
        {
            var notification = await exporterRepository.GetExporterOrDefaultByNotificationId(message.NotificationId);

            return(mapper.Map(notification, message.NotificationId));
        }