From IQueryable to TableQuery



使用Azure存储4.3.0,为了使用CloudTable.ExecuteQuerySegmentedAsync (TableQuery, TableContinuationToken),我需要在TableQuery中转换我的LinQ谓词过滤条件,我该如何做到这一点?

VB。净

Dim q = MyTable.CreateQuery(Of MyEntity).Where(Function(e) e.PartitionKey = "MyPK")
'Where do I go from here to use ExecuteQuerySegmentedAsync?

没关系,在Microsoft.WindowsAzure.Storage.Table.Queryable命名空间中我找到了我的答案,IQueryable。AsTableQuery:

Imports Microsoft.WindowsAzure.Storage.Table.Queryable
[...]
Dim q = MyTable.CreateQuery(Of MyEntity).Where(Function(e) e.PartitionKey = "MyPK")
Dim qQueryable = q.AsQueryable
' And then I will properly loop on this
mySegToken = Await MyTable.ExecuteQuerySegmentedAsync(qQueryable.AsTableQuery, mySegToken)

相关内容

  • 没有找到相关文章

最新更新