Entity Framework: Auto-updating foreign key when setting a new object reference
- by Adrian Grigore
Hi,
I am porting an existing application from Linq to SQL to Entity Framework 4 (default code generation).
One difference I noticed between the two is that a foreign key property are not updated when resetting the object reference. Now I need to decide how to deal with this.
For example supposing you have two entity types, Company and Employee.…