You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TPH: Support more discriminator conditions (NotNull etc.) #4722
EF6 had the ability to use multiple discriminator properties to avoid the use of a dedicated discriminator column. You can set that it up so that if a subclass property is not null, that tells EF that the correct type is the subclass that owns the property.
It would be great to be able to go .HasDiscriminatorNotNull<TSubclass>(_ => _.SubclassProperty).
That's just a suggestion as far as what the API looks like, but we do need some way to be able to get rid of logically redundant discriminator columns to keep our tables clean.
changed the title [-]TPH ability to discriminate based off which property is non-null[/-][+]TPH: Support more disciminator conditions (NotNull etc.)[/+]on Mar 8, 2016
changed the title [-]TPH: Support more disciminator conditions (NotNull etc.)[/-][+]TPH: Support more discriminator conditions (NotNull etc.)[/+]on Mar 8, 2016
Activity
[-]TPH ability to discriminate based off which property is non-null[/-][+]TPH: Support more disciminator conditions (NotNull etc.)[/+]rowanmiller commentedon Mar 8, 2016
Not currently supported but we do want to enable this (and other patterns) post v1.0.0
[-]TPH: Support more disciminator conditions (NotNull etc.)[/-][+]TPH: Support more discriminator conditions (NotNull etc.)[/+]AndriySvyryd commentedon Oct 11, 2018
Related: #10140
ajcvickers commentedon Apr 15, 2019
Closing in favor of #10140 which is basically a duplicate and has gathered more details.