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 建立實體類型和關聯性的模型化,以及 使用 EF Core 存取 Azure Cosmos DB

適用於