Closed hakotaro closed 10 years ago
Hello, thanks for posting it'll be fixed in the next version.
Please note that TableSet.Add() method returns IEnumerable which is a deferred result. So to execute insert operation you should enumerate result items like that:
tset.AddAsync(deList); // work, because it's not a deferred
tset.Add(deList).ToList(); // should work
If you have other questions feel free to communicate.
Hi
TableSet.Add(entities) doesn't seems to work properly, even through TableSet.AddAsync(entities) work well.
Example Code I test is below
string connectionString = "UseDevelopmentStorage=true"; // change to your connectionString string tableName = "testTableName"; CloudStorageAccount account = CloudStorageAccount.Parse(connectionString); CloudTableClient tableClient = account.CreateCloudTableClient(); tableClient.GetTableReference(tableName).CreateIfNotExists(); TableSet tset = new TableSet(tableClient,tableName);
tset.AddAsync(deList); // work tset.Add(deList); //doesn't work
If there are some mistakes I made, please let me know.