Check out example codes for "unknown discriminator value mongodb". It will help you in understanding the concepts better.

Code Example 1

BsonClassMap.RegisterClassMap<MyClass>();

// or:

[BsonDiscriminator("MyClass")]
public class MyClass
{ ... }

Learn ReactJs, React Native from akashmittal.com