c# - How to map a child with a constructor that refer to the parent class in MongoDB -
i'm using mongodb (with csharp driver) on project , i'm trying figure out something. see class structure below :
public class {    public ienumerable<b> collection {get;}    public a()    {       collection = new list<b>();    } }  public class b {    private _parent;    public b(a parent)    {       _parent=parent;    }    public parent => _parent; }   i'm trying configure mapping in mongo pass current deserialized instance of when deserialize child b. default, parent property of b isn't serialized. also, need create mapper class b because there's no default constructor can't figure out how tell mapper class pass instance of constructor paramter of b. clues ?
 
 
  
Comments
Post a Comment