public void Handle( ChangeShipmentAddress c) { _shipments.Perform( c.Id, shipment => shipment.UpdateAddress(c.Metadata, c.NewAddress), c.Metadata); }
public void Put(string id, [FromBody] string newAddress) { var command = new ChangeShipmentAddress { Id = id, NewAddress = newAddress, Metadata = new CommandMetadata { CommandId = Guid.NewGuid().ToString(), ConnectionId = Request.Headers["Connection-Id"] } }; _commandBus.Send(command); }