語言

CosmosModelExtensions 類別

定義

Cosmos 元資料的模型擴充方法。

[System.Runtime.CompilerServices.Nullable(0)]
public static class CosmosModelExtensions
public static class CosmosModelExtensions
[<System.Runtime.CompilerServices.Nullable(0)>]
type CosmosModelExtensions = class
type CosmosModelExtensions = class
Public Module CosmosModelExtensions
繼承
CosmosModelExtensions
屬性

備註

更多資訊與範例請參閱「建模實體類型與關係」以及「使用 EF Core 存取 Azure Cosmos DB」。

方法

名稱 Description
GetDefaultContainer(IModel)

會回傳預設容器名稱。

GetDefaultContainer(IReadOnlyModel)

會回傳預設容器名稱。

GetDefaultContainerConfigurationSource(IConventionModel)

回傳預設容器名稱的設定來源。

GetDefaultFullTextSearchLanguage(IReadOnlyModel)

在資料庫範圍內回傳全文搜尋的預設語言。

GetDefaultFullTextSearchLanguageConfigurationSource(IConventionModel)

在資料庫範圍內取得預設全文搜尋語言的 。ConfigurationSource

GetDiscriminatorInKey(IReadOnlyModel)

回傳一個值,指示實體類型判別器是否應包含在 JSON 的「id」值中。 在 EF Core 9 之前,它一直都包含在內。 從 EF Core 9 開始,預設不包含此功能。

GetDiscriminatorInKeyConfigurationSource(IConventionModel)

得到 ConfigurationSource 的 GetDiscriminatorInKey(IReadOnlyModel)。

GetHasShadowIds(IReadOnlyModel)

回傳一個值,表示是否可以從目前的組態來源設定「__id」屬性的設定中設定

GetHasShadowIdsConfigurationSource(IConventionModel)

得到 ConfigurationSource 的 GetHasShadowIds(IReadOnlyModel)。

GetThroughput(IReadOnlyModel)

回傳資料庫範圍內的配置吞吐量。

GetThroughputConfigurationSource(IConventionModel)

在資料庫範圍內取得已配置吞吐量的 。ConfigurationSource

SetDefaultContainer(IConventionModel, String, Boolean)

設定預設容器名稱。

SetDefaultContainer(IMutableModel, String)

設定預設容器名稱。

SetDefaultFullTextSearchLanguage(IConventionModel, String, Boolean)

設定資料庫範圍的全文搜尋預設語言。

SetDefaultFullTextSearchLanguage(IMutableModel, String)

設定資料庫範圍的全文搜尋預設語言。

SetDiscriminatorInKey(IConventionModel, Nullable<IdDiscriminatorMode>, Boolean)

在 JSON 「id」中包含實體類型判別器。

SetDiscriminatorInKey(IMutableModel, Nullable<IdDiscriminatorMode>)

在 JSON 「id」中包含實體類型判別器。

SetHasShadowIds(IConventionModel, Nullable<Boolean>, Boolean)

強制模型建置時必須建立一個映射到 JSON 「id」的「__id」陰影屬性。 這是 EF Core 9.0 之前的預設行為。

SetHasShadowIds(IMutableModel, Nullable<Boolean>)

強制模型建置時必須建立一個映射到 JSON 「id」的「__id」陰影屬性。 這是 EF Core 9.0 之前的預設行為。

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

設定資料庫範圍的配置吞吐量。

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

設定資料庫範圍的配置吞吐量。

適用於