CosmosEntityTypeBuilderExtensions.CanSetAnalyticalStoreTimeToLive 方法

定義

傳回值,指出是否可以從目前的組態來源設定分析存放區存留時間

public static bool CanSetAnalyticalStoreTimeToLive (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder entityTypeBuilder, int? seconds, bool fromDataAnnotation = false);
static member CanSetAnalyticalStoreTimeToLive : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder * Nullable<int> * bool -> bool
<Extension()>
Public Function CanSetAnalyticalStoreTimeToLive (entityTypeBuilder As IConventionEntityTypeBuilder, seconds As Nullable(Of Integer), Optional fromDataAnnotation As Boolean = false) As Boolean

參數

entityTypeBuilder
IConventionEntityTypeBuilder

正在設定之實體類型的產生器。

seconds
Nullable<Int32>

存留時間。

fromDataAnnotation
Boolean

指出是否使用資料批註來指定組態。

傳回

true 如果可以套用設定,則為 。

備註

如需詳細資訊和範例,請參閱 模型化實體類型和關聯性,以及 使用 EF Core 存取 Azure Cosmos DB

適用於