Share via


CosmosEntityTypeExtensions Class

Definition

Entity type extension methods for Cosmos metadata.

public static class CosmosEntityTypeExtensions
type CosmosEntityTypeExtensions = class
Public Module CosmosEntityTypeExtensions
Inheritance
CosmosEntityTypeExtensions

Remarks

See Modeling entity types and relationships, and Accessing Azure Cosmos DB with EF Core for more information and examples.

Methods

GetAnalyticalStoreTimeToLive(IReadOnlyEntityType)

Returns the time to live for analytical store in seconds at container scope.

GetAnalyticalStoreTimeToLiveConfigurationSource(IConventionEntityType)

Gets the ConfigurationSource for the time to live for analytical store in seconds at container scope.

GetContainer(IEntityType)

Returns the name of the container to which the entity type is mapped.

GetContainer(IReadOnlyEntityType)

Returns the name of the container to which the entity type is mapped.

GetContainerConfigurationSource(IConventionEntityType)

Gets the ConfigurationSource for the container to which the entity type is mapped.

GetContainingPropertyName(IEntityType)

Returns the name of the parent property to which the entity type is mapped.

GetContainingPropertyName(IReadOnlyEntityType)

Returns the name of the parent property to which the entity type is mapped.

GetContainingPropertyNameConfigurationSource(IConventionEntityType)

Gets the ConfigurationSource for the parent property to which the entity type is mapped.

GetDefaultTimeToLive(IReadOnlyEntityType)

Returns the default time to live in seconds at container scope.

GetDefaultTimeToLiveConfigurationSource(IConventionEntityType)

Gets the ConfigurationSource for the default time to live in seconds at container scope.

GetDiscriminatorInKey(IReadOnlyEntityType)

Returns a value indicating whether the entity type discriminator should be included in the JSON "id" value. Prior to EF Core 9, it was always included. Starting with EF Core 9, it is not included by default.

GetDiscriminatorInKeyConfigurationSource(IConventionEntityType)

Gets the ConfigurationSource for GetDiscriminatorInKey(IReadOnlyEntityType).

GetETagProperty(IConventionEntityType)

Gets the property on this entity that is mapped to Cosmos ETag, if it exists.

GetETagProperty(IEntityType)

Gets the property on this entity that is mapped to Cosmos ETag, if it exists.

GetETagProperty(IMutableEntityType)

Gets the property on this entity that is mapped to Cosmos ETag, if it exists.

GetETagProperty(IReadOnlyEntityType)

Gets the property on this entity that is mapped to Cosmos ETag, if it exists.

GetETagPropertyName(IEntityType)

Returns the name of the property that is used to store the etag.

GetETagPropertyName(IReadOnlyEntityType)

Returns the name of the property that is used to store the ETag.

GetETagPropertyNameConfigurationSource(IConventionEntityType)

Gets the ConfigurationSource for the property that is used to store the etag.

GetHasShadowId(IReadOnlyEntityType)

Returns a value indicating whether model building will always create a "__id" shadow property mapped to the JSON "id". This was the default behavior before EF Core 9.0.

GetHasShadowIdConfigurationSource(IConventionEntityType)

Gets the ConfigurationSource for GetHasShadowId(IReadOnlyEntityType).

GetPartitionKeyProperties(IConventionEntityType)

Returns the the properties that are used to store the hierarchical partition key.

GetPartitionKeyProperties(IEntityType)

Returns the the properties that are used to store the hierarchical partition key.

GetPartitionKeyProperties(IMutableEntityType)

Returns the the properties that are used to store the hierarchical partition key.

GetPartitionKeyProperties(IReadOnlyEntityType)

Returns the the properties that are used to store the hierarchical partition key.

GetPartitionKeyProperty(IConventionEntityType)
Obsolete.

Returns the property that is used to store the partition key.

GetPartitionKeyProperty(IEntityType)
Obsolete.

Returns the property that is used to store the partition key.

GetPartitionKeyProperty(IMutableEntityType)
Obsolete.

Returns the property that is used to store the partition key.

GetPartitionKeyProperty(IReadOnlyEntityType)
Obsolete.

Returns the property that is used to store the partition key.

GetPartitionKeyPropertyName(IEntityType)

Returns the name of the property that is used to store the partition key.

GetPartitionKeyPropertyName(IReadOnlyEntityType)
Obsolete.

Returns the name of the property that is used to store the partition key.

GetPartitionKeyPropertyNameConfigurationSource(IConventionEntityType)
Obsolete.

Gets the ConfigurationSource for the property that is used to store the partition key.

GetPartitionKeyPropertyNames(IReadOnlyEntityType)

Returns the names of the properties that are used to store the hierarchical partition key, if any.

GetPartitionKeyPropertyNamesConfigurationSource(IConventionEntityType)

Gets the ConfigurationSource for the properties that are used to store the hierarchical partition key.

GetThroughput(IReadOnlyEntityType)

Returns the provisioned throughput at container scope.

GetThroughputConfigurationSource(IConventionEntityType)

Gets the ConfigurationSource for the provisioned throughput at container scope.

SetAnalyticalStoreTimeToLive(IConventionEntityType, Nullable<Int32>, Boolean)

Sets the time to live for analytical store in seconds at container scope.

SetAnalyticalStoreTimeToLive(IMutableEntityType, Nullable<Int32>)

Sets the time to live for analytical store in seconds at container scope.

SetContainer(IConventionEntityType, String, Boolean)

Sets the name of the container to which the entity type is mapped.

SetContainer(IMutableEntityType, String)

Sets the name of the container to which the entity type is mapped.

SetContainingPropertyName(IConventionEntityType, String, Boolean)

Sets the name of the parent property to which the entity type is mapped.

SetContainingPropertyName(IMutableEntityType, String)

Sets the name of the parent property to which the entity type is mapped.

SetDefaultTimeToLive(IConventionEntityType, Nullable<Int32>, Boolean)

Sets the default time to live in seconds at container scope.

SetDefaultTimeToLive(IMutableEntityType, Nullable<Int32>)

Sets the default time to live in seconds at container scope.

SetDiscriminatorInKey(IConventionEntityType, Nullable<IdDiscriminatorMode>, Boolean)

Includes the entity type discriminator in the JSON "id".

SetDiscriminatorInKey(IMutableEntityType, Nullable<IdDiscriminatorMode>)

Includes the entity type discriminator in the JSON "id".

SetETagPropertyName(IConventionEntityType, String, Boolean)

Sets the name of the property that is used to store the ETag.

SetETagPropertyName(IMutableEntityType, String)

Sets the name of the property that is used to store the ETag key.

SetHasShadowId(IConventionEntityType, Nullable<Boolean>, Boolean)

Forces model building to always create a "__id" shadow property mapped to the JSON "id". This was the default behavior before EF Core 9.0.

SetHasShadowId(IMutableEntityType, Nullable<Boolean>)

Forces model building to always create a "__id" shadow property mapped to the JSON "id". This was the default behavior before EF Core 9.0.

SetPartitionKeyPropertyName(IConventionEntityType, String, Boolean)
Obsolete.

Sets the name of the property that is used to store the partition key.

SetPartitionKeyPropertyName(IMutableEntityType, String)
Obsolete.

Sets the name of the property that is used to store the partition key key.

SetPartitionKeyPropertyNames(IConventionEntityType, IReadOnlyList<String>, Boolean)

Sets the names of the properties that are used to store the hierarchical partition key.

SetPartitionKeyPropertyNames(IMutableEntityType, IReadOnlyList<String>)

Sets the names of the properties that are used to store the hierarchical partition key.

SetThroughput(IConventionEntityType, Nullable<Int32>, Nullable<Boolean>, Boolean)

Sets the provisioned throughput at container scope.

SetThroughput(IMutableEntityType, Nullable<Int32>, Nullable<Boolean>)

Sets the provisioned throughput at container scope.

Applies to