private void InsertObject(string id, dynamic dynamicObj, CyanTable currentTable) { dynamicObj.PartitionKey = "PK"; dynamicObj.RowKey = id; var simpleObject = JsonSubObjectsTraverser.ConvertToSimpleObject(dynamicObj); currentTable.Insert(simpleObject); var objs = JsonSubObjectsTraverser.Traverse(dynamicObj as JObject); foreach (var entity in objs.Keys) { var enityName = entity.Split('_')[0]; var table = GetTable(enityName); simpleObject = objs[entity]; table.Insert(simpleObject); } }
internal CyanEGT(CyanTable table) { this.table = table; }
/// <summary> /// Tries to create a new table. /// </summary> /// <param name="table">The name of the table to be created.</param> /// <param name="table">The table that has been created or already existed.</param> /// <returns>Returns <code>true</code> if the table was created succesfully, /// <code>false</code> if the table already exists.</returns> public bool TryCreateTable(string tableName, out CyanTable table) { var ret = TryCreateTable(tableName); table = this[tableName]; return ret; }