CosmosQueryableExtensions.WithPartitionKey Method

Definition

Overloads

WithPartitionKey<TEntity>(IQueryable<TEntity>, Object)

Specify the partition key for partition used for the query. Required when using a resource token that provides permission based on a partition key for authentication,

WithPartitionKey<TEntity>(IQueryable<TEntity>, String)

Specify the partition key for partition used for the query. Required when using a resource token that provides permission based on a partition key for authentication,

WithPartitionKey<TEntity>(IQueryable<TEntity>, Object, Object)

Specify the partition key for partition used for the query. Required when using a resource token that provides permission based on a partition key for authentication,

WithPartitionKey<TEntity>(IQueryable<TEntity>, Object, Object, Object)

Specify the partition key for partition used for the query. Required when using a resource token that provides permission based on a partition key for authentication,

WithPartitionKey<TEntity>(IQueryable<TEntity>, Object)

Source:
CosmosQueryableExtensions.cs

Specify the partition key for partition used for the query. Required when using a resource token that provides permission based on a partition key for authentication,

C#
public static System.Linq.IQueryable<TEntity> WithPartitionKey<TEntity> (this System.Linq.IQueryable<TEntity> source, object partitionKeyValue) where TEntity : class;

Type Parameters

TEntity

The type of entity being queried.

Parameters

source
IQueryable<TEntity>

The source query.

partitionKeyValue
Object

The partition key value.

Returns

IQueryable<TEntity>

A new query with the set partition key.

Remarks

See Querying data with EF Core, and Accessing Azure Cosmos DB with EF Core for more information and examples.

Applies to

Entity Framework Core 9.0
Proizvod Verzije
Entity Framework Core 9.0

WithPartitionKey<TEntity>(IQueryable<TEntity>, String)

Source:
CosmosQueryableExtensions.cs
Source:
CosmosQueryableExtensions.cs
Source:
CosmosQueryableExtensions.cs
Source:
CosmosQueryableExtensions.cs

Specify the partition key for partition used for the query. Required when using a resource token that provides permission based on a partition key for authentication,

C#
public static System.Linq.IQueryable<TEntity> WithPartitionKey<TEntity> (this System.Linq.IQueryable<TEntity> source, string partitionKey) where TEntity : class;

Type Parameters

TEntity

The type of entity being queried.

Parameters

source
IQueryable<TEntity>

The source query.

partitionKey
String

The partition key.

Returns

IQueryable<TEntity>

A new query with the set partition key.

Remarks

See Querying data with EF Core, and Accessing Azure Cosmos DB with EF Core for more information and examples.

Applies to

Entity Framework Core 8.0 i druge verzije
Proizvod Verzije
Entity Framework Core 5.0, 6.0, 7.0, 8.0

WithPartitionKey<TEntity>(IQueryable<TEntity>, Object, Object)

Source:
CosmosQueryableExtensions.cs

Specify the partition key for partition used for the query. Required when using a resource token that provides permission based on a partition key for authentication,

C#
public static System.Linq.IQueryable<TEntity> WithPartitionKey<TEntity> (this System.Linq.IQueryable<TEntity> source, object partitionKeyValue1, object partitionKeyValue2) where TEntity : class;

Type Parameters

TEntity

The type of entity being queried.

Parameters

source
IQueryable<TEntity>

The source query.

partitionKeyValue1
Object

The first value in a hierarchical partition key.

partitionKeyValue2
Object

The second value in a hierarchical partition key.

Returns

IQueryable<TEntity>

A new query with the set partition key.

Remarks

See Querying data with EF Core, and Accessing Azure Cosmos DB with EF Core for more information and examples.

Applies to

Entity Framework Core 9.0
Proizvod Verzije
Entity Framework Core 9.0

WithPartitionKey<TEntity>(IQueryable<TEntity>, Object, Object, Object)

Source:
CosmosQueryableExtensions.cs

Specify the partition key for partition used for the query. Required when using a resource token that provides permission based on a partition key for authentication,

C#
public static System.Linq.IQueryable<TEntity> WithPartitionKey<TEntity> (this System.Linq.IQueryable<TEntity> source, object partitionKeyValue1, object partitionKeyValue2, object partitionKeyValue3) where TEntity : class;

Type Parameters

TEntity

The type of entity being queried.

Parameters

source
IQueryable<TEntity>

The source query.

partitionKeyValue1
Object

The first value in a hierarchical partition key.

partitionKeyValue2
Object

The second value in a hierarchical partition key.

partitionKeyValue3
Object

The third value in a hierarchical partition key.

Returns

IQueryable<TEntity>

A new query with the set partition key.

Remarks

See Querying data with EF Core, and Accessing Azure Cosmos DB with EF Core for more information and examples.

Applies to

Entity Framework Core 9.0
Proizvod Verzije
Entity Framework Core 9.0