In MongoDB, polymorphism allows storing different types of objects in the same collection, where each object might have its unique structure. In MongoDB’s C# driver, this can be achieved using polymorphic classes.
How can I implement same feature using mongo ef core library?
Welcome to the MongoDB Community forums! You’re right, the .NET/C# driver does support polymorphic objects. This isn’t supported right now with our EF Core provider but we’re actively working on this (Type Discriminators) which would allow you to do so in our upcoming release. Hope that helps.