Embedded MongoDB Document not getting an ID on save with C# Driver
问题 When I have a root document that has a list of documents and I save/insert, the root document always gets an ID from MongoDB, but the documents in the list don't, they remain the same as ObjectId.Empty . I'm not sure if I'm doing something wrong or if this is intended behavior? Here's an example of what I'm trying to do: Given the classes: public class Foo { public ObjectId Id { get; set; } public string Name { get; set; } public IList<Bar> Bars { get; set; } } public class Bar { public