Note that there are some explanatory texts on larger screens.

plurals
  1. POHow does `CreateQuery` work with `TableServiceEntity` in Azure?
    text
    copied!<p>Previously, I was working with an Azure Storage Table that my program created, added to, queried from, and deleted itself.</p> <p>Now, I need to work with one that someone else provides. I used the same query logic, but I can't seem to get anything out of the queries.</p> <p>The columns in the storage table and the members in <code>MyEntry</code> class match exactly, except I did not include the PartitionKey and RowKey in <code>MyEntry</code> class.</p> <p>I also double-checked that the database I'm reading from exists in my code. I also viewed it in Server Explorer to verify its contents. However, I wasn't able to verify in my code if I can view the contents because I cannot read from it.</p> <p>Here is my query code:</p> <pre><code> TableServiceContext tableServiceContext = tableClient.GetDataServiceContext(); var query = from g in tableServiceContext.CreateQuery&lt;MyEntry&gt;(tableName) select g; </code></pre> <p>Here is MyEntry:</p> <pre><code>namespace Project_MyEntry { public class MyEntry: TableServiceEntity { public string Column3 { get; set; } public string Column4 { get; set; } public string Column5 { get; set; } public string Column6 { get; set; } public MyEntry() { } } } </code></pre> <p>I used to be able to simply do the query and get all the entries in the database, but now I'm not getting any. Previously, I had a non-empty constructor that I used to put stuff into my table, but now that my code is not allowed to alter the table, I removed it.</p> <p>Are there requirements for the TableServiceEntity to fulfill in order to work with the query?</p> <p>What exactly goes on when you specify a class in <code>CreateQuery</code>?</p> <p><strong>Edit:</strong> I read on Microsoft's documentation for <code>TableServiceEntity</code> that the requirement is to implement getters and setters for each column. I've done this but there's still nothing coming out of the queries. =[</p> <p>Here's the link to the TableServiceEntity <a href="http://dl.windowsazure.com/javadoc/com/microsoft/windowsazure/services/table/client/TableServiceEntity.html" rel="nofollow">doc</a>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload