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
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.
The text was updated successfully, but these errors were encountered:
rowanmiller
changed the title
TPH ability to discriminate based off which property is non-null
TPH: Support more disciminator conditions (NotNull etc.)
Mar 8, 2016
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.
The text was updated successfully, but these errors were encountered: