c# - 使用 .NET Core 从 Azure 表存储中检索前 n 个记录

标签 c# .net-core azure-table-storage

是否可以使用 C# 从 Azure 表存储中检索前 n 个记录?我正在使用 .NET Core。

如果我也能得到一些引用就好了。

请注意,我所有的实体都是使用日志尾模式存储的 https://learn.microsoft.com/en-us/azure/cosmos-db/table-storage-design-guide#log-tail-pattern

谢谢, 普拉文

最佳答案

您可以使用 Take()创建 TableQuery 时的方法:

TableQuery<T> query = new TableQuery<T>().Take(takeCount);

或者设置属性TakeCount指定它:

TableQuery<T> query = new TableQuery<T>();
query.TakeCount = takeCount;

关于c# - 使用 .NET Core 从 Azure 表存储中检索前 n 个记录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50682489/

相关文章:

c# - 如何延迟循环周期?

c# - DNN 6 模块 - 如何利用异步调用

c# - 在 C# 中使用自定义序列化时如何控制 XML 元素的名称?

Azure 表存储与 Azure 文档数据库 - 性能比较?

c# - Mac 和 Linux 上类似 Windows 的 shell 扩展

c# - 日期时间.ParseExact : "String not recognised as a valid DateTime"

c# - 为什么 ASP.NET Core 3.1 应用程序中的 appsettings 中的 Appinsight 日志级别被忽略?

visual-studio - Visual Studio 2017 项目引用旧版本的 Microsoft.AspNetCore.App

c# - 如何从Azure表存储中查询最近的n条记录?

Azure 表未将属性加载到对象中