Share via


CosmosEntityTypeExtensions.SetDefaultTimeToLive Method

Definition

Overloads

Name Description
SetDefaultTimeToLive(IMutableEntityType, Nullable<Int32>)

Sets the default time to live in seconds at container scope.

SetDefaultTimeToLive(IConventionEntityType, Nullable<Int32>, Boolean)

Sets the default time to live in seconds at container scope.

SetDefaultTimeToLive(IMutableEntityType, Nullable<Int32>)

Source:
CosmosEntityTypeExtensions.cs
Source:
CosmosEntityTypeExtensions.cs
Source:
CosmosEntityTypeExtensions.cs
Source:
CosmosEntityTypeExtensions.cs
Source:
CosmosEntityTypeExtensions.cs

Sets the default time to live in seconds at container scope.

public static void SetDefaultTimeToLive(this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, int? seconds);
static member SetDefaultTimeToLive : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * Nullable<int> -> unit
<Extension()>
Public Sub SetDefaultTimeToLive (entityType As IMutableEntityType, seconds As Nullable(Of Integer))

Parameters

entityType
IMutableEntityType

The entity type.

seconds
Nullable<Int32>

The time to live to set.

Applies to

SetDefaultTimeToLive(IConventionEntityType, Nullable<Int32>, Boolean)

Source:
CosmosEntityTypeExtensions.cs
Source:
CosmosEntityTypeExtensions.cs
Source:
CosmosEntityTypeExtensions.cs
Source:
CosmosEntityTypeExtensions.cs
Source:
CosmosEntityTypeExtensions.cs

Sets the default time to live in seconds at container scope.

public static int? SetDefaultTimeToLive(this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, int? seconds, bool fromDataAnnotation = false);
public static void SetDefaultTimeToLive(this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, int? seconds, bool fromDataAnnotation = false);
static member SetDefaultTimeToLive : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * Nullable<int> * bool -> Nullable<int>
static member SetDefaultTimeToLive : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * Nullable<int> * bool -> unit
<Extension()>
Public Function SetDefaultTimeToLive (entityType As IConventionEntityType, seconds As Nullable(Of Integer), Optional fromDataAnnotation As Boolean = false) As Nullable(Of Integer)
<Extension()>
Public Sub SetDefaultTimeToLive (entityType As IConventionEntityType, seconds As Nullable(Of Integer), Optional fromDataAnnotation As Boolean = false)

Parameters

entityType
IConventionEntityType

The entity type.

seconds
Nullable<Int32>

The time to live to set.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

Applies to