public async Task SaveConfigAsync(string deviceId, string configurationKey, string configurationJson)
 {
     var entity = new DeviceConfigurationEntity()
     {
         PartitionKey  = deviceId,
         RowKey        = configurationKey,
         Configuration = configurationJson
     };
     var operation = TableOperation.InsertOrReplace(entity);
     await _deviceConfigTableRef.ExecuteAsync(operation);
 }
        public static DeviceConfiguration ToDomain(this DeviceConfigurationEntity entity)
        {
            if (entity == null)
            {
                return(null);
            }

            return(new DeviceConfiguration
            {
                ConfigId = entity.ConfigId,
                ConfigName = entity.ConfigName,
                DeviceTypeId = entity.DeviceTypeId,
                DeviceId = entity.DeviceId,
                ParamsJson = entity.ParamsJson
            });
        }