Last post Sep 11, 2014 01:32 AM by Kevin Shen - MSFT
Sep 10, 2014 06:25 AM|slen|LINK
Here is my situation:
I have table Person and Salutation tables for example.
Person table has a constraint that is linked to Salutation table. The following are the properties that is in Person table.
- Salutation (object )
I have another 2 Audit tables named, AuditLog and AuditDetailLog (Purpose are to keep track of the changes in tables)
Here is the situation 1
When I retrieve an object from table Person and update the Salutation_id. I update the object ...
The record inserted but AuditLog cannot get the changes of the object that I passed in.
AuditLog is depended on the following code to know the changes in object. db = EntitiesModel object
ContextChanges cc = db.GetChanges();
When I retrieved a copy of object from the table Person. (I tried clone and CreateDetachCopy function) to get the copy.
Retrieving was successful. But Unfortunately, I got error when I try to update the object.
The following error is
Unable to cast object of type 'DDC.Salutation' to type 'OpenAccessRuntime.common.OID'.
any idea for a solution...
Sep 11, 2014 01:32 AM|Kevin Shen - MSFT|LINK
As far as I know, there is no GetChanges() method in DbContext instance of entity framework.
According to your description ,It seems that you are using telerik data access product which is out of our support scope,i suggest that you can post your issue to their forum for a professional solution:
If you are using entity framework, please share code which can reproduce your issue for us.