I am moving on to using the new warehouse client library for my table storage in Azure.
A query with the previous repository client library namespace 1.7:
var orders = serviceContext .CreateQuery<Order>(tableName) .AsTableServiceQuery<Order>() .Where(e => e.PartitionKey == partitionKey && e.RowKey == rowKey)
Request with the new Client Client Library 2.0 classes:
string partitionKeyFilter = TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, partitionKey); string rowKeyFilter = TableQuery.GenerateFilterCondition("RowKey", QueryComparisons.Equal, rowKey); string combinedFilter = TableQuery.CombineFilters(partitionKeyFilter, TableOperators.And, rowKeyFilter); var query = new TableQuery<Order>().Where(combinedFilter); var orders = table.ExecuteQuery<Order>(query);
Please correct me if I am wrong, but 1.7 is cleaner, uses strongly typed objects, implements the IQueryable interface and uses the full power of LINQ. Version 2.0 makes me feel like I'm working with ADO.NET datasets again.
Have I completely missed the plot here? I understand that there have been significant performance improvements, but why does version 2.0 look as downward as the API?
source share