From af7aaf81d5416725cdc534af99e36a933d17f755 Mon Sep 17 00:00:00 2001 From: Esteban Luchsinger Date: Tue, 25 Apr 2023 21:08:57 +0200 Subject: [PATCH] Complete the sample with the typed discriminator mapping (#4322) Co-authored-by: Arthur Vickers --- .../Modeling/Inheritance/FluentAPI/NonShadowDiscriminator.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/samples/core/Modeling/Inheritance/FluentAPI/NonShadowDiscriminator.cs b/samples/core/Modeling/Inheritance/FluentAPI/NonShadowDiscriminator.cs index 5ee418b835..e9bd45a656 100644 --- a/samples/core/Modeling/Inheritance/FluentAPI/NonShadowDiscriminator.cs +++ b/samples/core/Modeling/Inheritance/FluentAPI/NonShadowDiscriminator.cs @@ -16,6 +16,8 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .Property(e => e.BlogType) .HasMaxLength(200) .HasColumnName("blog_type"); + + modelBuilder.Entity(); } #endregion } @@ -30,4 +32,4 @@ public class Blog public class RssBlog : Blog { public string RssUrl { get; set; } -} \ No newline at end of file +}