Share via


IdDiscriminatorMode Enum

Definition

Defines the behavior for including discriminator values in the JSON "id" value.

public enum IdDiscriminatorMode
type IdDiscriminatorMode = 
Public Enum IdDiscriminatorMode
Inheritance
IdDiscriminatorMode

Fields

Name Value Description
None 0

No discriminator value is included in the "id" value.

EntityType 1

The discriminator value of the entity type is included in the "id" value. This was the default behavior before EF Core 9.

RootEntityType 2

The discriminator value of the root entity type is included in the "id" value. This allows types with the same primary key to be saved in the same container, while still allowing "ReadItem" to be used for lookups of an unknown type.

Applies to