I have a parent and child object. If I do the following
Child c = new Child();
c.ParentID = parentID;
context.Child.Add(c);
context.SaveChanges();
int i = c.Parent.ParentID; // throws an exception b/c Parent is null
Why is this doing this? If I get a new context (after saving), I can see Parent just fine.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…