I have tried to use RegisterForeignKey but when I try a FillByParentPrimaryKey on the child it throws an error saying the ParentRelationship must be set first. I set the foreign key with the following code:-
parentBO.RegisterForeignKey(childBO,
Then when I run the following code it throws the error.
childBO.FillByParentPrimaryKey(parentBO.PKField);
I guess I am doing something wrong but I can't see what. The RegisterForeignKey is definitely run first.
Any help would be appreciated.
Aaron