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

DocumentClient.CreateDocumentQuery 方法

定义

重载

CreateDocumentQuery(String, SqlQuerySpec, FeedOptions, Object)
已过时.

已重载。 此方法使用具有参数化值的 SQL 语句,为 Azure Cosmos DB 数据库中集合下的文档创建查询。 它返回 IQueryable{dynamic}。 有关使用参数化值准备 SQL 语句的详细信息,请参阅 SqlQuerySpec

CreateDocumentQuery(String, String, FeedOptions, Object)
已过时.

已重载。 此方法使用 SQL 语句为 Azure Cosmos DB 数据库中的集合下的文档创建查询。 它返回 IQueryable{dynamic}。

CreateDocumentQuery(Uri, String, FeedOptions)

用于在 Azure Cosmos DB 服务中创建文档查询的扩展方法。

CreateDocumentQuery(Uri, String, FeedOptions, Object)
已过时.

用于在 Azure Cosmos DB 服务中创建文档查询的扩展方法。

CreateDocumentQuery(Uri, SqlQuerySpec, FeedOptions, Object)
已过时.

用于在 Azure Cosmos DB 服务中创建文档查询的扩展方法。

CreateDocumentQuery(Uri, SqlQuerySpec, FeedOptions)

用于在 Azure Cosmos DB 服务中创建文档查询的扩展方法。

CreateDocumentQuery(String, String, FeedOptions)

已重载。 此方法使用 SQL 语句为 Azure Cosmos DB 数据库中的集合下的文档创建查询。 它返回 IQueryable{dynamic}。

CreateDocumentQuery(String, SqlQuerySpec, FeedOptions)

已重载。 此方法使用具有参数化值的 SQL 语句,为 Azure Cosmos DB 数据库中集合下的文档创建查询。 它返回 IQueryable{dynamic}。 有关使用参数化值准备 SQL 语句的详细信息,请参阅 SqlQuerySpec

CreateDocumentQuery(String, FeedOptions, Object)
已过时.

已重载。 此方法为 Azure Cosmos DB 服务中的集合下的文档创建查询。 它返回 IOrderedQueryable{Document}。

CreateDocumentQuery(Uri, FeedOptions)

用于在 Azure Cosmos DB 服务中创建文档查询的扩展方法。

CreateDocumentQuery(String, FeedOptions)

已重载。 此方法为 Azure Cosmos DB 服务中的集合下的文档创建查询。 它返回 IOrderedQueryable{Document}。

CreateDocumentQuery(Uri, FeedOptions, Object)
已过时.

用于在 Azure Cosmos DB 服务中创建文档查询的扩展方法。

CreateDocumentQuery<T>(Uri, SqlQuerySpec, FeedOptions)

用于在 Azure Cosmos DB 服务中创建文档查询的扩展方法。

CreateDocumentQuery<T>(Uri, String, FeedOptions, Object)
已过时.

用于在 Azure Cosmos DB 服务中创建文档查询的扩展方法。

CreateDocumentQuery<T>(Uri, SqlQuerySpec, FeedOptions, Object)
已过时.

用于为 Azure Cosmos DB 服务创建文档查询的扩展方法。

CreateDocumentQuery<T>(String, String, FeedOptions, Object)
已过时.

已重载。 此方法使用 SQL 语句为 Azure Cosmos DB 数据库中的集合下的文档创建查询。 它返回 IQueryable{T}。

CreateDocumentQuery<T>(String, SqlQuerySpec, FeedOptions, Object)
已过时.

已重载。 此方法使用具有参数化值的 SQL 语句,为 Azure Cosmos DB 数据库中集合下的文档创建查询。 它返回 IQueryable{T}。 有关使用参数化值准备 SQL 语句的详细信息,请参阅 SqlQuerySpec

CreateDocumentQuery<T>(Uri, String, FeedOptions)

用于在 Azure Cosmos DB 服务中创建文档查询的扩展方法。

CreateDocumentQuery<T>(Uri, FeedOptions, Object)
已过时.

用于在 Azure Cosmos DB 服务中创建文档查询的扩展方法。

CreateDocumentQuery<T>(String, String, FeedOptions)

已重载。 此方法使用 SQL 语句为 Azure Cosmos DB 数据库中的集合下的文档创建查询。 它返回 IQueryable{T}。

CreateDocumentQuery<T>(String, SqlQuerySpec, FeedOptions)

已重载。 此方法使用具有参数化值的 SQL 语句,为 Azure Cosmos DB 数据库中集合下的文档创建查询。 它返回 IQueryable{T}。 有关使用参数化值准备 SQL 语句的详细信息,请参阅 SqlQuerySpec

CreateDocumentQuery<T>(String, FeedOptions, Object)
已过时.

已重载。 此方法为 Azure Cosmos DB 服务中的集合下的文档创建查询。

CreateDocumentQuery<T>(Uri, FeedOptions)

用于在 Azure Cosmos DB 服务中创建文档查询的扩展方法。

CreateDocumentQuery<T>(String, FeedOptions)

已重载。 此方法为 Azure Cosmos DB 服务中的集合下的文档创建查询。

CreateDocumentQuery(String, SqlQuerySpec, FeedOptions, Object)

注意

Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.

已重载。 此方法使用具有参数化值的 SQL 语句,为 Azure Cosmos DB 数据库中集合下的文档创建查询。 它返回 IQueryable{dynamic}。 有关使用参数化值准备 SQL 语句的详细信息,请参阅 SqlQuerySpec

[System.Obsolete("Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.")]
public System.Linq.IQueryable<dynamic> CreateDocumentQuery (string collectionLink, Microsoft.Azure.Documents.SqlQuerySpec querySpec, Microsoft.Azure.Documents.Client.FeedOptions feedOptions, object partitionKey);
[<System.Obsolete("Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.")>]
member this.CreateDocumentQuery : string * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions * obj -> System.Linq.IQueryable<obj>
Public Function CreateDocumentQuery (collectionLink As String, querySpec As SqlQuerySpec, feedOptions As FeedOptions, partitionKey As Object) As IQueryable(Of Object)

参数

collectionLink
String

指向父文档集合的链接。 或者,在使用 IPartitionResolver 时,这可以是指向数据库的路径链接,例如 dbs/db_rid/

querySpec
SqlQuerySpec

包含 SQL 表达式的 SqlQuerySpec 实例。

feedOptions
FeedOptions

用于处理查询结果源的选项。 有关详细信息,请参阅 FeedOptions

partitionKey
Object

可与 IPartitionResolver 一起使用的分区键。

返回

可以计算查询的 IQueryable{dynamic> 。

属性

注解

对基于 IPartitionResolver 的方法重载的支持现已过时。 建议使用 分区集合 提高存储和吞吐量。

适用于

CreateDocumentQuery(String, String, FeedOptions, Object)

注意

Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.

已重载。 此方法使用 SQL 语句为 Azure Cosmos DB 数据库中的集合下的文档创建查询。 它返回 IQueryable{dynamic}。

[System.Obsolete("Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.")]
public System.Linq.IQueryable<dynamic> CreateDocumentQuery (string collectionLink, string sqlExpression, Microsoft.Azure.Documents.Client.FeedOptions feedOptions, object partitionKey);
[<System.Obsolete("Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.")>]
member this.CreateDocumentQuery : string * string * Microsoft.Azure.Documents.Client.FeedOptions * obj -> System.Linq.IQueryable<obj>
Public Function CreateDocumentQuery (collectionLink As String, sqlExpression As String, feedOptions As FeedOptions, partitionKey As Object) As IQueryable(Of Object)

参数

collectionLink
String

父文档集合的链接。 或者,在使用 IPartitionResolver 时,这可以是指向数据库的路径链接,例如 dbs/db_rid/

sqlExpression
String

SQL 语句。

feedOptions
FeedOptions

用于处理查询结果源的选项。 有关详细信息,请参阅 FeedOptions

partitionKey
Object

可与 IPartitionResolver 一起使用的分区键。

返回

可以计算查询的 IQueryable{dynamic> 。

属性

注解

对基于 IPartitionResolver 的方法重载的支持现已过时。 建议使用 分区集合 提高存储和吞吐量。

适用于

CreateDocumentQuery(Uri, String, FeedOptions)

用于在 Azure Cosmos DB 服务中创建文档查询的扩展方法。

public System.Linq.IQueryable<dynamic> CreateDocumentQuery (Uri documentCollectionOrDatabaseUri, string sqlExpression, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = default);
abstract member CreateDocumentQuery : Uri * string * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IQueryable<obj>
override this.CreateDocumentQuery : Uri * string * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IQueryable<obj>
Public Function CreateDocumentQuery (documentCollectionOrDatabaseUri As Uri, sqlExpression As String, Optional feedOptions As FeedOptions = Nothing) As IQueryable(Of Object)

参数

documentCollectionOrDatabaseUri
Uri

文档集合的 URI。

sqlExpression
String

sql 查询。

feedOptions
FeedOptions

用于处理查询结果源的选项。

返回

查询结果集。

实现

适用于

CreateDocumentQuery(Uri, String, FeedOptions, Object)

注意

Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.

用于在 Azure Cosmos DB 服务中创建文档查询的扩展方法。

[System.Obsolete("Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.")]
public System.Linq.IQueryable<dynamic> CreateDocumentQuery (Uri documentCollectionOrDatabaseUri, string sqlExpression, Microsoft.Azure.Documents.Client.FeedOptions feedOptions, object partitionKey);
[<System.Obsolete("Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.")>]
member this.CreateDocumentQuery : Uri * string * Microsoft.Azure.Documents.Client.FeedOptions * obj -> System.Linq.IQueryable<obj>
Public Function CreateDocumentQuery (documentCollectionOrDatabaseUri As Uri, sqlExpression As String, feedOptions As FeedOptions, partitionKey As Object) As IQueryable(Of Object)

参数

documentCollectionOrDatabaseUri
Uri

文档集合的 URI,例如 dbs/db_rid/colls/coll_rid/ 。 或者,这可以是使用 IPartitionResolver时数据库的 URI,例如 dbs/db_rid/

sqlExpression
String

sql 查询。

feedOptions
FeedOptions

用于处理查询结果源的选项。

partitionKey
Object

可与 IPartitionResolver 一起使用的分区键。

返回

查询结果集。

属性

注解

对基于 IPartitionResolver 的方法重载的支持现已过时。 建议使用 分区集合 提高存储和吞吐量。

适用于

CreateDocumentQuery(Uri, SqlQuerySpec, FeedOptions, Object)

注意

Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.

用于在 Azure Cosmos DB 服务中创建文档查询的扩展方法。

[System.Obsolete("Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.")]
public System.Linq.IQueryable<dynamic> CreateDocumentQuery (Uri documentCollectionOrDatabaseUri, Microsoft.Azure.Documents.SqlQuerySpec querySpec, Microsoft.Azure.Documents.Client.FeedOptions feedOptions, object partitionKey);
[<System.Obsolete("Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.")>]
member this.CreateDocumentQuery : Uri * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions * obj -> System.Linq.IQueryable<obj>
Public Function CreateDocumentQuery (documentCollectionOrDatabaseUri As Uri, querySpec As SqlQuerySpec, feedOptions As FeedOptions, partitionKey As Object) As IQueryable(Of Object)

参数

documentCollectionOrDatabaseUri
Uri

文档集合的 URI,例如 dbs/db_rid/colls/coll_rid/ 。 或者,这可以是使用 IPartitionResolver时数据库的 URI,例如 dbs/db_rid/

querySpec
SqlQuerySpec

sql 查询。

feedOptions
FeedOptions

用于处理查询结果源的选项。

partitionKey
Object

可与 IPartitionResolver 一起使用的分区键。

返回

查询结果集。

属性

注解

对基于 IPartitionResolver 的方法重载的支持现已过时。 建议使用 分区集合 提高存储和吞吐量。

适用于

CreateDocumentQuery(Uri, SqlQuerySpec, FeedOptions)

用于在 Azure Cosmos DB 服务中创建文档查询的扩展方法。

public System.Linq.IQueryable<dynamic> CreateDocumentQuery (Uri documentCollectionOrDatabaseUri, Microsoft.Azure.Documents.SqlQuerySpec querySpec, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = default);
abstract member CreateDocumentQuery : Uri * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IQueryable<obj>
override this.CreateDocumentQuery : Uri * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IQueryable<obj>
Public Function CreateDocumentQuery (documentCollectionOrDatabaseUri As Uri, querySpec As SqlQuerySpec, Optional feedOptions As FeedOptions = Nothing) As IQueryable(Of Object)

参数

documentCollectionOrDatabaseUri
Uri

文档集合的 URI。

querySpec
SqlQuerySpec

sql 查询。

feedOptions
FeedOptions

用于处理查询结果源的选项。

返回

查询结果集。

实现

适用于

CreateDocumentQuery(String, String, FeedOptions)

已重载。 此方法使用 SQL 语句为 Azure Cosmos DB 数据库中的集合下的文档创建查询。 它返回 IQueryable{dynamic}。

public System.Linq.IQueryable<dynamic> CreateDocumentQuery (string collectionLink, string sqlExpression, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = default);
abstract member CreateDocumentQuery : string * string * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IQueryable<obj>
override this.CreateDocumentQuery : string * string * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IQueryable<obj>
Public Function CreateDocumentQuery (collectionLink As String, sqlExpression As String, Optional feedOptions As FeedOptions = Nothing) As IQueryable(Of Object)

参数

collectionLink
String

指向父文档集合的链接。

sqlExpression
String

SQL 语句。

feedOptions
FeedOptions

用于处理查询结果源的选项。 有关详细信息,请参阅 FeedOptions

返回

可以计算查询的 IQueryable{dynamic> 。

实现

示例

以下示例查询书籍文档。

// SQL querying allows dynamic property access
dynamic document = client.CreateDocumentQuery<dynamic>(collectionLink,
    "SELECT * FROM books b WHERE b.title == 'War and Peace'").AsEnumerable().FirstOrDefault();

注解

有关语法和示例, https://docs.microsoft.com/azure/cosmos-db/sql-query-getting-started/ 请参阅 。

另请参阅

适用于

CreateDocumentQuery(String, SqlQuerySpec, FeedOptions)

已重载。 此方法使用具有参数化值的 SQL 语句,为 Azure Cosmos DB 数据库中集合下的文档创建查询。 它返回 IQueryable{dynamic}。 有关使用参数化值准备 SQL 语句的详细信息,请参阅 SqlQuerySpec

public System.Linq.IQueryable<dynamic> CreateDocumentQuery (string collectionLink, Microsoft.Azure.Documents.SqlQuerySpec querySpec, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = default);
abstract member CreateDocumentQuery : string * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IQueryable<obj>
override this.CreateDocumentQuery : string * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IQueryable<obj>
Public Function CreateDocumentQuery (collectionLink As String, querySpec As SqlQuerySpec, Optional feedOptions As FeedOptions = Nothing) As IQueryable(Of Object)

参数

collectionLink
String

指向父文档集合的链接。

querySpec
SqlQuerySpec

包含 SQL 表达式的 SqlQuerySpec 实例。

feedOptions
FeedOptions

用于处理查询结果源的选项。 有关详细信息,请参阅 FeedOptions

返回

可以计算查询的 IQueryable{dynamic> 。

实现

示例

以下示例查询书籍文档。

// SQL querying allows dynamic property access
var query = new SqlQuerySpec(
    "SELECT * FROM books b WHERE b.title = @title", 
    new SqlParameterCollection(new SqlParameter[] { new SqlParameter { Name = "@title", Value = "War and Peace" }}));

dynamic document = client.CreateDocumentQuery<dynamic>(collectionLink, query).AsEnumerable().FirstOrDefault();

注解

有关语法和示例, https://docs.microsoft.com/azure/cosmos-db/sql-query-getting-started/ 请参阅 。

另请参阅

适用于

CreateDocumentQuery(String, FeedOptions, Object)

注意

Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.

已重载。 此方法为 Azure Cosmos DB 服务中的集合下的文档创建查询。 它返回 IOrderedQueryable{Document}。

[System.Obsolete("Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.")]
public System.Linq.IOrderedQueryable<Microsoft.Azure.Documents.Document> CreateDocumentQuery (string collectionLink, Microsoft.Azure.Documents.Client.FeedOptions feedOptions, object partitionKey);
[<System.Obsolete("Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.")>]
member this.CreateDocumentQuery : string * Microsoft.Azure.Documents.Client.FeedOptions * obj -> System.Linq.IOrderedQueryable<Microsoft.Azure.Documents.Document>
Public Function CreateDocumentQuery (collectionLink As String, feedOptions As FeedOptions, partitionKey As Object) As IOrderedQueryable(Of Document)

参数

collectionLink
String

指向父文档集合的链接。 或者,在使用 IPartitionResolver 时,这可以是指向数据库的路径链接。

feedOptions
FeedOptions

用于处理查询结果源的选项。 有关详细信息,请参阅 FeedOptions

partitionKey
Object

可与 IPartitionResolver 一起使用的可选分区键。

返回

可以计算查询的 IOrderedQueryable{Document}。

属性

注解

对基于 IPartitionResolver 的方法重载的支持现已过时。 建议使用 分区集合 提高存储和吞吐量。

适用于

CreateDocumentQuery(Uri, FeedOptions)

用于在 Azure Cosmos DB 服务中创建文档查询的扩展方法。

public System.Linq.IOrderedQueryable<Microsoft.Azure.Documents.Document> CreateDocumentQuery (Uri documentCollectionOrDatabaseUri, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = default);
abstract member CreateDocumentQuery : Uri * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IOrderedQueryable<Microsoft.Azure.Documents.Document>
override this.CreateDocumentQuery : Uri * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IOrderedQueryable<Microsoft.Azure.Documents.Document>
Public Function CreateDocumentQuery (documentCollectionOrDatabaseUri As Uri, Optional feedOptions As FeedOptions = Nothing) As IOrderedQueryable(Of Document)

参数

documentCollectionOrDatabaseUri
Uri

文档集合的 URI。

feedOptions
FeedOptions

用于处理查询结果源的选项。

返回

查询结果集。

实现

适用于

CreateDocumentQuery(String, FeedOptions)

已重载。 此方法为 Azure Cosmos DB 服务中的集合下的文档创建查询。 它返回 IOrderedQueryable{Document}。

public System.Linq.IOrderedQueryable<Microsoft.Azure.Documents.Document> CreateDocumentQuery (string collectionLink, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = default);
abstract member CreateDocumentQuery : string * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IOrderedQueryable<Microsoft.Azure.Documents.Document>
override this.CreateDocumentQuery : string * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IOrderedQueryable<Microsoft.Azure.Documents.Document>
Public Function CreateDocumentQuery (collectionLink As String, Optional feedOptions As FeedOptions = Nothing) As IOrderedQueryable(Of Document)

参数

collectionLink
String

指向父文档集合的链接。

feedOptions
FeedOptions

用于处理查询结果源的选项。 有关详细信息,请参阅 FeedOptions

返回

可以计算查询的 IOrderedQueryable{Document}。

实现

示例

以下示例按 ID 查询文档。

Document document = client.CreateDocumentQuery<Document>(collectionLink)
    .Where(d => d.Id == "War and Peace").AsEnumerable().FirstOrDefault();

注解

当查询的文档的架构未知或按 ID 查询和替换/删除文档时,应使用此重载。 由于 Document 是 DynamicObject,因此可以动态转换回原始 C# 对象。

另请参阅

适用于

CreateDocumentQuery(Uri, FeedOptions, Object)

注意

Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.

用于在 Azure Cosmos DB 服务中创建文档查询的扩展方法。

[System.Obsolete("Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.")]
public System.Linq.IOrderedQueryable<Microsoft.Azure.Documents.Document> CreateDocumentQuery (Uri documentCollectionOrDatabaseUri, Microsoft.Azure.Documents.Client.FeedOptions feedOptions, object partitionKey);
[<System.Obsolete("Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.")>]
member this.CreateDocumentQuery : Uri * Microsoft.Azure.Documents.Client.FeedOptions * obj -> System.Linq.IOrderedQueryable<Microsoft.Azure.Documents.Document>
Public Function CreateDocumentQuery (documentCollectionOrDatabaseUri As Uri, feedOptions As FeedOptions, partitionKey As Object) As IOrderedQueryable(Of Document)

参数

documentCollectionOrDatabaseUri
Uri

文档集合的 URI,例如 dbs/db_rid/colls/coll_rid/ 。 或者,这可以是使用 IPartitionResolver时数据库的 URI,例如 dbs/db_rid/

feedOptions
FeedOptions

用于处理查询结果源的选项。

partitionKey
Object

可与 IPartitionResolver 一起使用的分区键。

返回

查询结果集。

属性

注解

对基于 IPartitionResolver 的方法重载的支持现已过时。 建议使用 分区集合 提高存储和吞吐量。

适用于

CreateDocumentQuery<T>(Uri, SqlQuerySpec, FeedOptions)

用于在 Azure Cosmos DB 服务中创建文档查询的扩展方法。

public System.Linq.IQueryable<T> CreateDocumentQuery<T> (Uri documentCollectionOrDatabaseUri, Microsoft.Azure.Documents.SqlQuerySpec querySpec, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = default);
abstract member CreateDocumentQuery : Uri * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IQueryable<'T>
override this.CreateDocumentQuery : Uri * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IQueryable<'T>
Public Function CreateDocumentQuery(Of T) (documentCollectionOrDatabaseUri As Uri, querySpec As SqlQuerySpec, Optional feedOptions As FeedOptions = Nothing) As IQueryable(Of T)

类型参数

T

要查询的对象的类型。

参数

documentCollectionOrDatabaseUri
Uri

文档集合的 URI。

querySpec
SqlQuerySpec

sql 查询。

feedOptions
FeedOptions

用于处理查询结果源的选项。

返回

查询结果集。

实现

适用于

CreateDocumentQuery<T>(Uri, String, FeedOptions, Object)

注意

Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.

用于在 Azure Cosmos DB 服务中创建文档查询的扩展方法。

[System.Obsolete("Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.")]
public System.Linq.IQueryable<T> CreateDocumentQuery<T> (Uri documentCollectionOrDatabaseUri, string sqlExpression, Microsoft.Azure.Documents.Client.FeedOptions feedOptions, object partitionKey);
[<System.Obsolete("Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.")>]
member this.CreateDocumentQuery : Uri * string * Microsoft.Azure.Documents.Client.FeedOptions * obj -> System.Linq.IQueryable<'T>
Public Function CreateDocumentQuery(Of T) (documentCollectionOrDatabaseUri As Uri, sqlExpression As String, feedOptions As FeedOptions, partitionKey As Object) As IQueryable(Of T)

类型参数

T

要查询的对象的类型。

参数

documentCollectionOrDatabaseUri
Uri

文档集合的 URI,例如 dbs/db_rid/colls/coll_rid/ 。 或者,这可以是使用 IPartitionResolver时数据库的 URI,例如 dbs/db_rid/

sqlExpression
String

sql 查询。

feedOptions
FeedOptions

用于处理查询结果源的选项。

partitionKey
Object

可与 IPartitionResolver 一起使用的分区键。

返回

查询结果集。

属性

注解

对基于 IPartitionResolver 的方法重载的支持现已过时。 建议使用 分区集合 提高存储和吞吐量。

适用于

CreateDocumentQuery<T>(Uri, SqlQuerySpec, FeedOptions, Object)

注意

Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.

用于为 Azure Cosmos DB 服务创建文档查询的扩展方法。

[System.Obsolete("Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.")]
public System.Linq.IQueryable<T> CreateDocumentQuery<T> (Uri documentCollectionOrDatabaseUri, Microsoft.Azure.Documents.SqlQuerySpec querySpec, Microsoft.Azure.Documents.Client.FeedOptions feedOptions, object partitionKey);
[<System.Obsolete("Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.")>]
member this.CreateDocumentQuery : Uri * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions * obj -> System.Linq.IQueryable<'T>
Public Function CreateDocumentQuery(Of T) (documentCollectionOrDatabaseUri As Uri, querySpec As SqlQuerySpec, feedOptions As FeedOptions, partitionKey As Object) As IQueryable(Of T)

类型参数

T

要查询的对象的类型。

参数

documentCollectionOrDatabaseUri
Uri

文档集合的 URI,例如 dbs/db_rid/colls/coll_rid/ 。 或者,这可以是使用 IPartitionResolver时数据库的 URI,例如 dbs/db_rid/

querySpec
SqlQuerySpec

sql 查询。

feedOptions
FeedOptions

用于处理查询结果源的选项。

partitionKey
Object

可与 IPartitionResolver 一起使用的分区键。

返回

查询结果集。

属性

注解

对基于 IPartitionResolver 的方法重载的支持现已过时。 建议使用 分区集合 提高存储和吞吐量。

适用于

CreateDocumentQuery<T>(String, String, FeedOptions, Object)

注意

Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.

已重载。 此方法使用 SQL 语句为 Azure Cosmos DB 数据库中的集合下的文档创建查询。 它返回 IQueryable{T}。

[System.Obsolete("Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.")]
public System.Linq.IQueryable<T> CreateDocumentQuery<T> (string collectionLink, string sqlExpression, Microsoft.Azure.Documents.Client.FeedOptions feedOptions, object partitionKey);
[<System.Obsolete("Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.")>]
member this.CreateDocumentQuery : string * string * Microsoft.Azure.Documents.Client.FeedOptions * obj -> System.Linq.IQueryable<'T>
Public Function CreateDocumentQuery(Of T) (collectionLink As String, sqlExpression As String, feedOptions As FeedOptions, partitionKey As Object) As IQueryable(Of T)

类型参数

T

要查询的对象的类型。

参数

collectionLink
String

集合下文档的路径链接,例如 dbs/db_rid/colls/coll_rid/docs/。 或者,在使用 IPartitionResolver 时,这可以是指向数据库的路径链接,例如 dbs/db_rid/

sqlExpression
String

SQL 语句。

feedOptions
FeedOptions

用于处理查询结果源的选项。 有关详细信息,请参阅 FeedOptions

partitionKey
Object

可与 IPartitionResolver 一起使用的分区键。

返回

可计算查询的 IQueryable{T}。

属性

注解

对基于 IPartitionResolver 的方法重载的支持现已过时。 建议使用 分区集合 提高存储和吞吐量。

适用于

CreateDocumentQuery<T>(String, SqlQuerySpec, FeedOptions, Object)

注意

Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.

已重载。 此方法使用具有参数化值的 SQL 语句,为 Azure Cosmos DB 数据库中集合下的文档创建查询。 它返回 IQueryable{T}。 有关使用参数化值准备 SQL 语句的详细信息,请参阅 SqlQuerySpec

[System.Obsolete("Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.")]
public System.Linq.IQueryable<T> CreateDocumentQuery<T> (string collectionLink, Microsoft.Azure.Documents.SqlQuerySpec querySpec, Microsoft.Azure.Documents.Client.FeedOptions feedOptions, object partitionKey);
[<System.Obsolete("Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.")>]
member this.CreateDocumentQuery : string * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions * obj -> System.Linq.IQueryable<'T>
Public Function CreateDocumentQuery(Of T) (collectionLink As String, querySpec As SqlQuerySpec, feedOptions As FeedOptions, partitionKey As Object) As IQueryable(Of T)

类型参数

T

要查询的对象的类型。

参数

collectionLink
String

指向父文档集合的链接。 或者,在使用 IPartitionResolver 时,这可以是指向数据库的路径链接。

querySpec
SqlQuerySpec

包含 SQL 表达式的 SqlQuerySpec 实例。

feedOptions
FeedOptions

用于处理查询结果源的选项。 有关详细信息,请参阅 FeedOptions

partitionKey
Object

可与 IPartitionResolver 一起使用的分区键。

返回

可计算查询的 IQueryable{T}。

属性

注解

对基于 IPartitionResolver 的方法重载的支持现已过时。 建议使用 分区集合 提高存储和吞吐量。

适用于

CreateDocumentQuery<T>(Uri, String, FeedOptions)

用于在 Azure Cosmos DB 服务中创建文档查询的扩展方法。

public System.Linq.IQueryable<T> CreateDocumentQuery<T> (Uri documentCollectionOrDatabaseUri, string sqlExpression, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = default);
abstract member CreateDocumentQuery : Uri * string * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IQueryable<'T>
override this.CreateDocumentQuery : Uri * string * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IQueryable<'T>
Public Function CreateDocumentQuery(Of T) (documentCollectionOrDatabaseUri As Uri, sqlExpression As String, Optional feedOptions As FeedOptions = Nothing) As IQueryable(Of T)

类型参数

T

要查询的对象的类型。

参数

documentCollectionOrDatabaseUri
Uri

文档集合的 URI。

sqlExpression
String

sql 查询。

feedOptions
FeedOptions

用于处理查询结果源的选项。

返回

查询结果集。

实现

适用于

CreateDocumentQuery<T>(Uri, FeedOptions, Object)

注意

Support for IPartitionResolver based method overloads is now obsolete. Please use the override that does not take a partitionKey parameter.

用于在 Azure Cosmos DB 服务中创建文档查询的扩展方法。

[System.Obsolete("Support for IPartitionResolver based method overloads is now obsolete. Please use the override that does not take a partitionKey parameter.")]
public System.Linq.IOrderedQueryable<T> CreateDocumentQuery<T> (Uri documentCollectionOrDatabaseUri, Microsoft.Azure.Documents.Client.FeedOptions feedOptions, object partitionKey);
[<System.Obsolete("Support for IPartitionResolver based method overloads is now obsolete. Please use the override that does not take a partitionKey parameter.")>]
member this.CreateDocumentQuery : Uri * Microsoft.Azure.Documents.Client.FeedOptions * obj -> System.Linq.IOrderedQueryable<'T>
Public Function CreateDocumentQuery(Of T) (documentCollectionOrDatabaseUri As Uri, feedOptions As FeedOptions, partitionKey As Object) As IOrderedQueryable(Of T)

类型参数

T

要查询的对象的类型。

参数

documentCollectionOrDatabaseUri
Uri

文档集合的 URI,例如 dbs/db_rid/colls/coll_rid/ 。 或者,这可以是使用 IPartitionResolver时数据库的 URI,例如 dbs/db_rid/

feedOptions
FeedOptions

用于处理查询结果源的选项。

partitionKey
Object

可与 IPartitionResolver 一起使用的分区键。

返回

查询结果集。

属性

注解

对基于 IPartitionResolver 的方法重载的支持现已过时。 建议使用 分区集合 提高存储和吞吐量。

适用于

CreateDocumentQuery<T>(String, String, FeedOptions)

已重载。 此方法使用 SQL 语句为 Azure Cosmos DB 数据库中的集合下的文档创建查询。 它返回 IQueryable{T}。

public System.Linq.IQueryable<T> CreateDocumentQuery<T> (string collectionLink, string sqlExpression, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = default);
abstract member CreateDocumentQuery : string * string * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IQueryable<'T>
override this.CreateDocumentQuery : string * string * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IQueryable<'T>
Public Function CreateDocumentQuery(Of T) (collectionLink As String, sqlExpression As String, Optional feedOptions As FeedOptions = Nothing) As IQueryable(Of T)

类型参数

T

要查询的对象的类型。

参数

collectionLink
String

指向父集合的链接。

sqlExpression
String

SQL 语句。

feedOptions
FeedOptions

用于处理查询结果源的选项。 有关详细信息,请参阅 FeedOptions

返回

可计算查询的 IQueryable{T}。

实现

示例

以下示例查询一些书籍文档。

public class Book 
{
    [JsonProperty("title")]
    public string Title {get; set;}

    public Author Author {get; set;}

    public int Price {get; set;}
}

public class Author
{
    public string FirstName {get; set;}
    public string LastName {get; set;}
}

// Query by the Title property
Book book = client.CreateDocumentQuery<Book>(collectionLink, 
    "SELECT * FROM books b WHERE b.title  = 'War and Peace'").AsEnumerable().FirstOrDefault();

// Query a nested property
Book otherBook = client.CreateDocumentQuery<Book>(collectionLink,
    "SELECT * FROM books b WHERE b.Author.FirstName = 'Leo'").AsEnumerable().FirstOrDefault();

// Perform a range query (needs an IndexType.Range on price or FeedOptions.EnableScansInQuery)
foreach (Book matchingBook in client.CreateDocumentQuery<Book>(
    collectionLink, "SELECT * FROM books b where b.Price > 1000"))
{
    // Iterate through books
}

// Query asychronously. Optionally set FeedOptions.MaxItemCount to control page size
using (var queryable = client.CreateDocumentQuery<Book>(collectionLink, 
    "SELECT * FROM books b WHERE b.title  = 'War and Peace'", 
    new FeedOptions { MaxItemCount = 10 }).AsDocumentQuery())
{
    while (queryable.HasMoreResults) 
    {
        foreach(Book b in await queryable.ExecuteNextAsync<Book>())
        {
            // Iterate through books
        }
    }
}

注解

有关语法和示例, https://docs.microsoft.com/azure/cosmos-db/sql-query-getting-started/ 请参阅 。

另请参阅

适用于

CreateDocumentQuery<T>(String, SqlQuerySpec, FeedOptions)

已重载。 此方法使用具有参数化值的 SQL 语句,为 Azure Cosmos DB 数据库中集合下的文档创建查询。 它返回 IQueryable{T}。 有关使用参数化值准备 SQL 语句的详细信息,请参阅 SqlQuerySpec

public System.Linq.IQueryable<T> CreateDocumentQuery<T> (string collectionLink, Microsoft.Azure.Documents.SqlQuerySpec querySpec, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = default);
abstract member CreateDocumentQuery : string * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IQueryable<'T>
override this.CreateDocumentQuery : string * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IQueryable<'T>
Public Function CreateDocumentQuery(Of T) (collectionLink As String, querySpec As SqlQuerySpec, Optional feedOptions As FeedOptions = Nothing) As IQueryable(Of T)

类型参数

T

要查询的对象的类型。

参数

collectionLink
String

指向父文档集合的链接。

querySpec
SqlQuerySpec

包含 SQL 表达式的 SqlQuerySpec 实例。

feedOptions
FeedOptions

用于处理查询结果源的选项。 有关详细信息,请参阅 FeedOptions

返回

可计算查询的 IQueryable{T}。

实现

示例

以下示例查询一些书籍文档。

public class Book 
{
    [JsonProperty("title")]
    public string Title {get; set;}

    public Author Author {get; set;}

    public int Price {get; set;}
}

public class Author
{
    public string FirstName {get; set;}
    public string LastName {get; set;}
}

// Query using Title
Book book, otherBook;

var query = new SqlQuerySpec(
    "SELECT * FROM books b WHERE b.title = @title", 
    new SqlParameterCollection(new SqlParameter[] { new SqlParameter { Name = "@title", Value = "War and Peace" }}));
book = client.CreateDocumentQuery<Book>(collectionLink, query).AsEnumerable().FirstOrDefault();

// Query a nested property
query = new SqlQuerySpec(
    "SELECT * FROM books b WHERE b.Author.FirstName = @firstName", 
    new SqlParameterCollection(new SqlParameter[] { new SqlParameter { Name = "@firstName", Value = "Leo" }}));
otherBook = client.CreateDocumentQuery<Book>(collectionLink, query).AsEnumerable().FirstOrDefault();

// Perform a range query (needs an IndexType.Range on price or FeedOptions.EnableScansInQuery)
query = new SqlQuerySpec(
    "SELECT * FROM books b WHERE b.Price > @minPrice", 
    new SqlParameterCollection(new SqlParameter[] { new SqlParameter { Name = "@minPrice", Value = 1000 }}));
foreach (Book b in client.CreateDocumentQuery<Book>(
    collectionLink, query))
{
    // Iterate through books
}

// Query asychronously. Optionally set FeedOptions.MaxItemCount to control page size
query = new SqlQuerySpec(
    "SELECT * FROM books b WHERE b.title = @title", 
    new SqlParameterCollection(new SqlParameter[] { new SqlParameter { Name = "@title", Value = "War and Peace" }}));

using (var queryable = client.CreateDocumentQuery<Book>(collectionLink, query, 
    new FeedOptions { MaxItemCount = 10 }).AsDocumentQuery())
{
    while (queryable.HasMoreResults) 
    {
        foreach(Book b in await queryable.ExecuteNextAsync<Book>())
        {
            // Iterate through books
        }
    }
}

注解

有关语法和示例, https://docs.microsoft.com/azure/cosmos-db/sql-query-getting-started/ 请参阅 。

另请参阅

适用于

CreateDocumentQuery<T>(String, FeedOptions, Object)

注意

Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.

已重载。 此方法为 Azure Cosmos DB 服务中的集合下的文档创建查询。

[System.Obsolete("Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.")]
public System.Linq.IOrderedQueryable<T> CreateDocumentQuery<T> (string documentsFeedOrDatabaseLink, Microsoft.Azure.Documents.Client.FeedOptions feedOptions, object partitionKey);
[<System.Obsolete("Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.")>]
member this.CreateDocumentQuery : string * Microsoft.Azure.Documents.Client.FeedOptions * obj -> System.Linq.IOrderedQueryable<'T>
Public Function CreateDocumentQuery(Of T) (documentsFeedOrDatabaseLink As String, feedOptions As FeedOptions, partitionKey As Object) As IOrderedQueryable(Of T)

类型参数

T

要查询的对象的类型。

参数

documentsFeedOrDatabaseLink
String

集合下文档的路径链接,例如 dbs/db_rid/colls/coll_rid/docs/ 。 或者,使用 IPartitionResolver 时,这可以是数据库的路径链接,例如 dbs/db_rid/

feedOptions
FeedOptions

用于处理查询结果源的选项。 有关详细信息,请参阅 FeedOptions

partitionKey
Object

可与 IPartitionResolver 一起使用的分区键。

返回

可以评估查询的 IOrderedQueryable{T}。

属性

注解

对基于 IPartitionResolver 的方法重载的支持现已过时。 建议使用 分区集合 提高存储和吞吐量。

适用于

CreateDocumentQuery<T>(Uri, FeedOptions)

用于在 Azure Cosmos DB 服务中创建文档查询的扩展方法。

public System.Linq.IOrderedQueryable<T> CreateDocumentQuery<T> (Uri documentCollectionUri, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = default);
abstract member CreateDocumentQuery : Uri * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IOrderedQueryable<'T>
override this.CreateDocumentQuery : Uri * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IOrderedQueryable<'T>
Public Function CreateDocumentQuery(Of T) (documentCollectionUri As Uri, Optional feedOptions As FeedOptions = Nothing) As IOrderedQueryable(Of T)

类型参数

T

要查询的对象的类型。

参数

documentCollectionUri
Uri

文档集合的 URI。

feedOptions
FeedOptions

用于处理查询结果源的选项。

返回

查询结果集。

实现

适用于

CreateDocumentQuery<T>(String, FeedOptions)

已重载。 此方法为 Azure Cosmos DB 服务中的集合下的文档创建查询。

public System.Linq.IOrderedQueryable<T> CreateDocumentQuery<T> (string collectionLink, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = default);
abstract member CreateDocumentQuery : string * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IOrderedQueryable<'T>
override this.CreateDocumentQuery : string * Microsoft.Azure.Documents.Client.FeedOptions -> System.Linq.IOrderedQueryable<'T>
Public Function CreateDocumentQuery(Of T) (collectionLink As String, Optional feedOptions As FeedOptions = Nothing) As IOrderedQueryable(Of T)

类型参数

T

要查询的对象的类型。

参数

collectionLink
String

指向父集合资源的链接。

feedOptions
FeedOptions

用于处理查询结果源的选项。 有关详细信息,请参阅 FeedOptions

返回

可以评估查询的 IOrderedQueryable{T}。

实现

示例

以下示例查询某些书籍文档。

public class Book 
{
    [JsonProperty("title")]
    public string Title {get; set;}

    public Author Author {get; set;}

    public int Price {get; set;}
}

public class Author
{
    public string FirstName {get; set;}
    public string LastName {get; set;}
}

// Query by the Title property
Book book = client.CreateDocumentQuery<Book>(collectionLink).Where(b => b.Title == "War and Peace").AsEnumerable().FirstOrDefault();

// Query a nested property
Book otherBook = client.CreateDocumentQuery<Book>(collectionLink).Where(b => b.Author.FirstName == "Leo").AsEnumerable().FirstOrDefault();

// Perform a range query (needs an IndexType.Range on price or FeedOptions.EnableScansInQuery)
foreach (Book matchingBook in client.CreateDocumentQuery<Book>(collectionLink).Where(b => b.Price > 100))
{
    // Iterate through books
}

// Query asychronously. Optionally set FeedOptions.MaxItemCount to control page size
using (var queryable = client.CreateDocumentQuery<Book>(
    collectionLink,
    new FeedOptions { MaxItemCount = 10 })
    .Where(b => b.Title == "War and Peace")
    .AsDocumentQuery())
{
    while (queryable.HasMoreResults) 
    {
        foreach(Book b in await queryable.ExecuteNextAsync<Book>())
        {
            // Iterate through books
        }
    }
}

注解

Azure Cosmos DB LINQ 提供程序编译 LINQ to SQL 语句。 https://docs.microsoft.com/azure/cosmos-db/sql-query-linq-to-sql有关 Azure Cosmos DB LINQ 提供程序支持的表达式列表,请参阅 。 生成的 IQueryable 上的 ToString () 返回转换后的 SQL 语句。 Azure Cosmos DB 提供程序将成员的 JSON.NET 和 DataContract 序列化属性转换为其 JSON 属性名称。

另请参阅

适用于