Entity Framework 5 not updating navigation properties in both entities
- by Taylor
I have updated a project to use the new Entity framework shipped with VS2012, however I have run into some of my code throwing exceptions.
In the VS10 version of EF I was able to create or modify and Entity and use its navigation properties before calling SaveChanges()
For example:
A Navigation property of a client having a collection of Invoices.
Client c = new Client();
Invoice I = new Invoice();
c.Invoices.Add(I);
I would then be able to use Invoice.Client somewhere in my code before actually saving it without issue. Now Invoice.Client == null.
Similarly in setting I.Client = C, I does not show up under C.Invoices
What am I missing here or is this just simply how EF5 is?