你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

TableClient.GetEntity<T> 方法

定义

获取类型的 T指定表实体。

public virtual Azure.Response<T> GetEntity<T> (string partitionKey, string rowKey, System.Collections.Generic.IEnumerable<string> select = default, System.Threading.CancellationToken cancellationToken = default) where T : class, Azure.Data.Tables.ITableEntity;
abstract member GetEntity : string * string * seq<string> * System.Threading.CancellationToken -> Azure.Response<'T (requires 'T : null and 'T :> Azure.Data.Tables.ITableEntity)> (requires 'T : null and 'T :> Azure.Data.Tables.ITableEntity)
override this.GetEntity : string * string * seq<string> * System.Threading.CancellationToken -> Azure.Response<'T (requires 'T : null and 'T :> Azure.Data.Tables.ITableEntity)> (requires 'T : null and 'T :> Azure.Data.Tables.ITableEntity)
Public Overridable Function GetEntity(Of T As {Class, ITableEntity}) (partitionKey As String, rowKey As String, Optional select As IEnumerable(Of String) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of T)

类型参数

T

实现 ITableEntity 或 实例的 TableEntity自定义模型类型。

参数

partitionKey
String

标识表实体的 partitionKey。

rowKey
String

标识表实体的 rowKey。

select
IEnumerable<String>

选择要在结果集中返回的实体属性集。

cancellationToken
CancellationToken

控制 CancellationToken 请求生存期的 。

返回

指示 Response 操作结果的 。

例外

如果实体不存在,则引发异常。

partitionKeyrowKey 为 null。

适用于