Update Related Entities
Posted: Wed 26 May 2010 02:48
We are using dotconnect for Oracle to generate our EDM for website.
The entities are detached since we pass them thru our service layer. We have a User table, with a foreign key to a Role table. When a User's role is updated the foreign key is not updated in the User Table.
The EDM generates a Role property and RoleReference property on the User Entity. When the SaveChanges method is called, the above two property changes are not propogated to the DB, since they are in Unchanged State (due to the dettached nature of the User Entity).
The entities are detached since we pass them thru our service layer. We have a User table, with a foreign key to a Role table. When a User's role is updated the foreign key is not updated in the User Table.
The EDM generates a Role property and RoleReference property on the User Entity. When the SaveChanges method is called, the above two property changes are not propogated to the DB, since they are in Unchanged State (due to the dettached nature of the User Entity).