Пример #1
0
        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);
            }
        }
Пример #2
0
 internal CyanEGT(CyanTable table)
 {
     this.table = table;
 }
Пример #3
0
        /// <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;
        }