예제 #1
0
        public void Handle(ShipmentAddressChanged e)
        {
            var collection = _database.GetCollection(ShipmentCollection);
            var filter     = Builders <BsonDocument> .Filter.Eq("id", e.Id);

            var update = Builders <BsonDocument> .Update
                         .Set("address", e.NewAddress)
                         .CurrentDate("lastModified");

            collection.UpdateOne(filter, update);

            _channel.SendToExchange(RabbitMqRoutingConfiguration.SuccessExchange, e.Metadata.ConnectionId, e);
        }
예제 #2
0
 public void On(ShipmentAddressChanged e)
 {
     Address = e.NewAddress;
 }