Enabling Embedded Objects' Configuration for Polymorphism

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Hi,

      creating something like [BsonKnownTypes] and [BsonDiscriminator] Attributes to configure Nested Objects is one of essential features that should be available in EF Core MongoDB Provider.

      Code Example:

      {{}}

      public class TempDocument 
      {
          public ParentType Type {get; set;} 
      }
      public class ParentType 
      { 
          // properties 
      } 
      public class TypeA: ParentType 
      { 
          // properties 
      } 
      public class TypeB: ParentType
      {
          // properties 
      }
      
      

      {{}}

      ParentType, TypeA and TypeB classes need a new feature to be configured in (DatabaseContext class // OnModelCreating method).

              Assignee:
              Unassigned
              Reporter:
              امیرحسین رحمتی
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: