Created
November 15, 2012 22:52
-
-
Save sandrinodimattia/4082081 to your computer and use it in GitHub Desktop.
Reading with DictionaryTableEntity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| TableQuery<DictionaryTableEntity> query = | |
| new TableQuery<DictionaryTableEntity>().Where(TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, "MSFT")); | |
| var microsoftMetadata = customersMetadataTable.ExecuteQuery(query); | |
| foreach (var record in microsoftMetadata) | |
| { | |
| Console.WriteLine("Processing: {0}", record.RowKey); | |
| if (record.RowKey.StartsWith("ADDRESS")) | |
| { | |
| Console.WriteLine(" > This is an address"); | |
| Console.WriteLine(" - Street: {0}", record["street"].StringValue); | |
| Console.WriteLine(" - City: {0}", record["city"].StringValue); | |
| } | |
| else if (record.RowKey.StartsWith("WEBSITE")) | |
| { | |
| Console.WriteLine(" > This is an website"); | |
| Console.WriteLine(" - Url: {0}", record["url"].StringValue); | |
| } | |
| Console.WriteLine(" > All properties"); | |
| foreach (var property in record) | |
| Console.WriteLine(" - {0}: {1}", property.Key, property.Value.StringValue); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment