Storage Client Library 2.0. Why is the API not so intuitive how to use 1.7?

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?

+4
source share
2 answers

The warehouse client library 2.0 still contains an obsolete DataServices implementation in a different namespace. On the other hand, the implementation of the new table showed significant performance improvements over the updated implementation of DataServices and previous versions of the SDK. Depending on latency, operations improved by 25% and 75%, and the use of system resources also decreased significantly.

For more information, see the Windows Azure Storage Library 2.0 Tables Deep Dive . As mentioned in the blog post, you can still use the legacy DataServices implementation that has been ported to the Microsoft.WindowsAzure.Storage.Table.DataServices namespace if you prefer LINQ.

Support for IQueryable in the new Tier of table service is currently under development. We currently do not have more details on the timing.

+3
source

Accordingly, access to 2.1 RC is now available, which contains IQueryable (with some pretty nice optimizations) for the table service level. Cm.

http://blogs.msdn.com/b/windowsazurestorage/archive/2013/07/12/introducing-storage-client-library-2-1-rc-for-net-and-windows-phone-8.aspx

http://www.nuget.org/packages/WindowsAzure.Storage

Joe

+2
source

All Articles