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); }
public void On(ShipmentCreated e) { Id = e.Id; Address = e.Address; }
private void Apply(ShipmentCreated evt) { _status = Status.Created; }