Mongodb collection as dynamic
问题 I have an application that has two similar but different objects and I want to store those objects in the same collection. What is the best way to do this? And how can I query this collection? Today my collections is represented by: public IMongoCollection<Post> Posts { get { return _database.GetCollection<Post>("posts"); } } And I have this class: public class Post { public string Id { get; set; } public string Message { get; set; } } public class NewTypePost { public string Id { get; set; }