コード例 #1
0
        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);
        }
コード例 #2
0
        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}");
        }