title: TableQuery<T> from Azure TableStorage that filters on PartitionKey
body: <p>I'm trying to abstract geting all entities from a Table by partitionKey, like so:</p>
  
  <pre><code>public List&lt;T&gt; GetEntities&lt;T&gt;(string partitionKey, T entity) where T : TableEntity
      {
          try
          {
              var tableClient = _account.CreateCloudTableClient();
              var table = tableClient.GetTableReference(entity.GetType().Name.ToLower());
              var exQuery =
                  new TableQuery&lt;T&gt;().Where(TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal,
                                                                               partitionKey));
  
              var results = table.ExecuteQuery(exQuery).Select(ent =&gt; (T) ent).ToList();
              return results;
          }
          catch (StorageException ex)
          {
              //TODO: Add more trace info
              Trace.TraceInformation("Unable to retrieve entity based on query specs");
              return null;
          }
      }
  </code></pre>
  
  <p>However, It's failing on the </p>
  
  <pre><code>new TableQuery&lt;T&gt;
  </code></pre>
  
  <p>because the TElement does not have a parameterless constructor.</p>