public void Handle(ShipmentCreated e)
        {
            var collection = _database.GetCollection(ShipmentCollection);
            var shipment   = new BsonDocument
            {
                { "id", e.Id },
                { "address", e.Address }
            };

            collection.InsertOne(shipment);

            _channel.SendToExchange(RabbitMqRoutingConfiguration.SuccessExchange, e.Metadata.ConnectionId, e);
        }
Esempio n. 2
0
 public void On(ShipmentCreated e)
 {
     Id      = e.Id;
     Address = e.Address;
 }
Esempio n. 3
0
 private void Apply(ShipmentCreated evt)
 {
     _status = Status.Created;
 }