public async Task <DeviceRegistryApiModel> PutAsync(string id, [FromBody] DeviceRegistryApiModel device)
        {
            DevicePropertyDelegate updateListDelegate = new DevicePropertyDelegate(this.deviceProperties.UpdateListAsync);

            return(new DeviceRegistryApiModel(await this.devices.CreateOrUpdateAsync(device.ToServiceModel(), updateListDelegate)));
        }
 public async Task <DeviceRegistryApiModel> PostAsync([FromBody] DeviceRegistryApiModel device)
 {
     return(new DeviceRegistryApiModel(await this.devices.CreateAsync(device.ToServiceModel())));
 }