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); }
public void On(ShipmentAddressChanged e) { Address = e.NewAddress; }