/// <summary> /// Save to azure table, typing all columns as strings. /// Overwrite if the table already exists /// Fabricate a partition and row key is they're not provided in the table. /// </summary> /// <param name="table">datatable to save</param> /// <param name="account">cloud account to write to</param> /// <param name="tableName">azure table name to save as. </param> public static void SaveToAzureTable(this DataTable table, CloudStorageAccount account, string tableName) { // When no types are provided, just assume they're all strings. int len = table.ColumnNames.Count(); Type[] columnTypes = new Type[len]; for (int i = 0; i < len; i++) { columnTypes[i] = typeof(string); } table.SaveToAzureTable(account, tableName, columnTypes); }
public static void SaveToAzureTable(this DataTable table, CloudStorageAccount account, string tableName, Type[] columnTypes) { table.SaveToAzureTable(account, tableName, columnTypes, funcComputeKeys: null); }