public async void Patch(Guid id, [FromBody] string name) { var addUserEndpoint = await _bus.GetSendEndpoint(new Uri("rabbitmq://localhost/SensorCommands")); var newob = new UpdateSensorDetailCommand(new Guid(), id, name); await addUserEndpoint.Send <UpdateSensorDetailCommand>(newob); }
public async Task <string> Get(Guid id, string name) { var addUserEndpoint = await _bus.GetSendEndpoint(new Uri("rabbitmq://localhost/SensorCommands")); var newOb = new UpdateSensorDetailCommand(new Guid(), id, name); await addUserEndpoint.Send(newOb); return($"updated name onsensor id: {newOb.SensorId} with name {name}"); }