iam trying to update a FK-relation like below...
If iam REMOVING the "SubmitChanges()" in the line that i've marked below, the set of "a.Calculated_bid_price" throws an error during the "SubmitChanges() at the bottom"...
the field "Calculated_bid_price" is not related to the "new_relation_entity"..
I really don't understand why this happens? Can you explain the logic here?
Code: Select all
Entity_Table_XXX a = GetTable();
Entitiy_YYY new_relation_entity = GetNewRealtionEntity();
a.Relation_Entity= new_relation_entity;
db.SubmitChanges(); // If i remove this line, the error with "calculated_bid_price" occurs
a.Calculated_bid_price = a.Calculated_bid_price + 1;
db.SubmitChanges();