次の方法で共有


CosmosModelExtensions.SetDiscriminatorInKey Method

Definition

Overloads

SetDiscriminatorInKey(IMutableModel, Nullable<IdDiscriminatorMode>)

Includes the entity type discriminator in the JSON "id".

SetDiscriminatorInKey(IConventionModel, Nullable<IdDiscriminatorMode>, Boolean)

Includes the entity type discriminator in the JSON "id".

SetDiscriminatorInKey(IMutableModel, Nullable<IdDiscriminatorMode>)

Source:
CosmosModelExtensions.cs

Includes the entity type discriminator in the JSON "id".

public static void SetDiscriminatorInKey (this Microsoft.EntityFrameworkCore.Metadata.IMutableModel model, Microsoft.EntityFrameworkCore.Metadata.IdDiscriminatorMode? behavior);
static member SetDiscriminatorInKey : Microsoft.EntityFrameworkCore.Metadata.IMutableModel * Nullable<Microsoft.EntityFrameworkCore.Metadata.IdDiscriminatorMode> -> unit
<Extension()>
Public Sub SetDiscriminatorInKey (model As IMutableModel, behavior As Nullable(Of IdDiscriminatorMode))

Parameters

model
IMutableModel

The model.

behavior
Nullable<IdDiscriminatorMode>

The behavior to use, or null to reset the behavior to the default.

Applies to

SetDiscriminatorInKey(IConventionModel, Nullable<IdDiscriminatorMode>, Boolean)

Source:
CosmosModelExtensions.cs

Includes the entity type discriminator in the JSON "id".

public static Microsoft.EntityFrameworkCore.Metadata.IdDiscriminatorMode? SetDiscriminatorInKey (this Microsoft.EntityFrameworkCore.Metadata.IConventionModel model, Microsoft.EntityFrameworkCore.Metadata.IdDiscriminatorMode? behavior, bool fromDataAnnotation = false);
static member SetDiscriminatorInKey : Microsoft.EntityFrameworkCore.Metadata.IConventionModel * Nullable<Microsoft.EntityFrameworkCore.Metadata.IdDiscriminatorMode> * bool -> Nullable<Microsoft.EntityFrameworkCore.Metadata.IdDiscriminatorMode>
<Extension()>
Public Function SetDiscriminatorInKey (model As IConventionModel, behavior As Nullable(Of IdDiscriminatorMode), Optional fromDataAnnotation As Boolean = false) As Nullable(Of IdDiscriminatorMode)

Parameters

model
IConventionModel

The model.

behavior
Nullable<IdDiscriminatorMode>

The behavior to use, or null to reset the behavior to the default.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

Applies to