Looking for a bit of mapping help.
I am using the following so a parent can load a child. The child object 'ContactHistory' has no knowledge of it's parent.
HasOne(x => x.ContactHistory).ForeignKey("ContactID");
However, I also need to do the reverse where the child loads its parent. I have tried the same mapping style and the code runs but the parent object is always null.
I want to quickly fill some dtos so the objects will not be persisted. I am just trying to create a hierarchy of objects in one dto to send to the view.
Any pointers much appreciated.