We are using Telerik Data Access in web project.
There is our purpose that the dbcontext object operations(insert, update,delete) log in generic architecture.
The function of db.context .hascahnges is aware of the changes and changes are transferred to lists as follow.
var contextChanges = dbContext.GetChanges();
System.Collections.Generic.IList<object> allUpdates = contextChanges.GetUpdates<object>();
System.Collections.Generic.IList<object> allDeletes = contextChanges.GetDeletes<object>();
We want to serialize the object of the new and old state by foreach in list and save in database.But our problem is that;
state change properties take them one by one.
foreach (var prop in obj.GetType().GetProperties())
dbContext.GetOriginalValue<object>(item, prop.Name);// only prop value but I want to object
//if old value != new value
How can I get the old object?