CosmosQueryableExtensions.WithPartitionKey Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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, |
- 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,
public static System.Linq.IQueryable<TEntity> WithPartitionKey<TEntity> (this System.Linq.IQueryable<TEntity> source, object partitionKeyValue) where TEntity : class;
static member WithPartitionKey : System.Linq.IQueryable<'Entity (requires 'Entity : null)> * obj -> System.Linq.IQueryable<'Entity (requires 'Entity : null)> (requires 'Entity : null)
<Extension()>
Public Function WithPartitionKey(Of TEntity As Class) (source As IQueryable(Of TEntity), partitionKeyValue As Object) As IQueryable(Of TEntity)
Type Parameters
- TEntity
The type of entity being queried.
Parameters
- source
- IQueryable<TEntity>
The source query.
- partitionKeyValue
- Object
The partition key value.
Returns
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 |
- 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,
public static System.Linq.IQueryable<TEntity> WithPartitionKey<TEntity> (this System.Linq.IQueryable<TEntity> source, string partitionKey) where TEntity : class;
static member WithPartitionKey : System.Linq.IQueryable<'Entity (requires 'Entity : null)> * string -> System.Linq.IQueryable<'Entity (requires 'Entity : null)> (requires 'Entity : null)
<Extension()>
Public Function WithPartitionKey(Of TEntity As Class) (source As IQueryable(Of TEntity), partitionKey As String) As IQueryable(Of TEntity)
Type Parameters
- TEntity
The type of entity being queried.
Parameters
- source
- IQueryable<TEntity>
The source query.
- partitionKey
- String
The partition key.
Returns
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 |
- 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,
public static System.Linq.IQueryable<TEntity> WithPartitionKey<TEntity> (this System.Linq.IQueryable<TEntity> source, object partitionKeyValue1, object partitionKeyValue2) where TEntity : class;
static member WithPartitionKey : System.Linq.IQueryable<'Entity (requires 'Entity : null)> * obj * obj -> System.Linq.IQueryable<'Entity (requires 'Entity : null)> (requires 'Entity : null)
<Extension()>
Public Function WithPartitionKey(Of TEntity As Class) (source As IQueryable(Of TEntity), partitionKeyValue1 As Object, partitionKeyValue2 As Object) As IQueryable(Of TEntity)
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
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 |
- 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,
public static System.Linq.IQueryable<TEntity> WithPartitionKey<TEntity> (this System.Linq.IQueryable<TEntity> source, object partitionKeyValue1, object partitionKeyValue2, object partitionKeyValue3) where TEntity : class;
static member WithPartitionKey : System.Linq.IQueryable<'Entity (requires 'Entity : null)> * obj * obj * obj -> System.Linq.IQueryable<'Entity (requires 'Entity : null)> (requires 'Entity : null)
<Extension()>
Public Function WithPartitionKey(Of TEntity As Class) (source As IQueryable(Of TEntity), partitionKeyValue1 As Object, partitionKeyValue2 As Object, partitionKeyValue3 As Object) As IQueryable(Of TEntity)
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
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 |
Entity Framework povratne informacije
Entity Framework je projekat otvorenog koda. Odaberite vezu za pružanje povratnih informacija: