Partilhar via


CosmosModelExtensions Class

Definition

Model extension methods for Cosmos metadata.

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

Remarks

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

Methods

GetDefaultContainer(IModel)

Returns the default container name.

GetDefaultContainer(IReadOnlyModel)

Returns the default container name.

GetDefaultContainerConfigurationSource(IConventionModel)

Returns the configuration source for the default container name.

GetDiscriminatorInKey(IReadOnlyModel)

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(IConventionModel)

Gets the ConfigurationSource for GetDiscriminatorInKey(IReadOnlyModel).

GetHasShadowIds(IReadOnlyModel)

Returns a value indicating whether the setting for always creating the "__id" property can be set from the current configuration source

GetHasShadowIdsConfigurationSource(IConventionModel)

Gets the ConfigurationSource for GetHasShadowIds(IReadOnlyModel).

GetThroughput(IReadOnlyModel)

Returns the provisioned throughput at database scope.

GetThroughputConfigurationSource(IConventionModel)

Gets the ConfigurationSource for the provisioned throughput at database scope.

SetDefaultContainer(IConventionModel, String, Boolean)

Sets the default container name.

SetDefaultContainer(IMutableModel, String)

Sets the default container name.

SetDiscriminatorInKey(IConventionModel, Nullable<IdDiscriminatorMode>, Boolean)

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

SetDiscriminatorInKey(IMutableModel, Nullable<IdDiscriminatorMode>)

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

SetHasShadowIds(IConventionModel, 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.

SetHasShadowIds(IMutableModel, 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.

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

Sets the provisioned throughput at database scope.

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

Sets the provisioned throughput at database scope.

Applies to