我可以从 Windows Azure 表存储中仅检索某些字段吗

发布于 2025-01-07 11:28:42 字数 393 浏览 4 评论 0原文

我有以下课程:

public class Menu : TableServiceEntity
{

    public string Order { get; set; }
    public string Text { get; set; }
    public int    Length { get; set; }
}

我只想从 TableStorage 中检索 PartitionKey、RowKey、Order 和 Length 数据。

有什么方法可以让我检索这些数据还是我仍然需要检索所有内容。我问的原因是因为文本字段包含大量数据,我想将检索到的数据最小化为我需要的数据。

请注意,这不是 SQL Azure 存储。谢谢

I have the following class:

public class Menu : TableServiceEntity
{

    public string Order { get; set; }
    public string Text { get; set; }
    public int    Length { get; set; }
}

I would like to retrieve only the PartitionKey, RowKey, Order and Length data from my TableStorage.

Is there some way that I can just retrieve this data or do I still need to retrieve everything. The reason I ask is because the Text field contains some large amounts of data and I would like to minimize what is retrieved to just what I need.

Please note this is not SQL Azure storage. Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

海的爱人是光 2025-01-14 11:28:42

从 2011-08-18 版本开始,您可以使用查询投影 (LINQ Select)。

var context = cloudTableClient.GetDataServiceContext();
context.CreateQuery<Menu>().Select(...);

检查一下:http://msdn.microsoft.com/en-us/库/windowsazure/dd135725.aspx

From the 2011-08-18 version you can use the query projection (LINQ Select).

var context = cloudTableClient.GetDataServiceContext();
context.CreateQuery<Menu>().Select(...);

Check this: http://msdn.microsoft.com/en-us/library/windowsazure/dd135725.aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文