I have 2 classes with a LINQ association between them i.e.:
Table1: Table2: ID ID Name Description ForiegnID
The association here is between Table1.ID -> Table2.ForiegnID
I need to be able to change the value of Table2.ForiegnID, however I can’t and think it is because of the association (as when I remove it, it works).
Therefore, does anyone know how I can change the value of the associated field Table2.ForiegnID?
Check out the designer.cs file. This is the key’s property
And this is the associations property.
It’s best to assign changes through the association instead of the key. That way, you don’t have to worry about whether the parent is loaded.