Uploaded image for project: 'Entity Framework'
  1. Entity Framework
  2. EF-86

Enabling Embedded Objects' Configuration for Polymorphism

    • Type: Icon: New Feature New Feature
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 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 Unassigned
            Reporter:
            www.amir233@gmail.com امیرحسین رحمتی
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: