devlooped/TableStorage

Add support for querying over TableEntityRepository

kzu opened this issue · 0 comments

kzu commented

The really nice LINQ queries over the custom-typed ITableRepository<T> is so useful that it's a pity we don't have the same for generic TableEntity repository.

We should enable that and allow the same code to use either custom types or generic entities for querying and projecting.

In particular, we should be more flexible in what projections are allowed, since we do allow any custom type deserialization (for the regular ITableRepository<T>, so we could offer something the OOB table APIs don't allow, which is rich project to anonymous types.

Example:

var query = from book in repo.CreateQuery()
            where
                book.PartitionKey == "Rick Riordan" &&
                book.RowKey.CompareTo("97814231") >= 0 &&
                book.RowKey.CompareTo("97814232") < 0
            select new { Title = (string)book["Title"] };