語言

CosmosModelBuilderExtensions.CanSetThroughput 方法

定義

回傳一個值,表示是否可以設定給定的吞吐量。

public static bool CanSetThroughput(this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder modelBuilder, int? throughput, bool autoscale, bool fromDataAnnotation = false);
static member CanSetThroughput : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder * Nullable<int> * bool * bool -> bool
<Extension()>
Public Function CanSetThroughput (modelBuilder As IConventionModelBuilder, throughput As Nullable(Of Integer), autoscale As Boolean, Optional fromDataAnnotation As Boolean = false) As Boolean

參數

modelBuilder
IConventionModelBuilder

模型建構器。

throughput
Nullable<Int32>

要設定的吞吐量。

autoscale
Boolean

是否啟用了自動縮放。

fromDataAnnotation
Boolean

表示配置是否以資料註解方式指定。

傳回

true 如果容器名稱能設為預設。

備註

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

適用於