I am in the hypothetical phase of thinking of how to do something in code, so I have no concrete code examples yet. But, let's assume you have an entity type Person (with attributes such as first name, last name, DOB, etc.). When one goes to edit a person entity, you may only update one or two fields (possibly all, but usually not). Think of this as implementing an audit trail (albeit not a legal one, just informational), i.e. Tommy changed last name from Jones to Smith on 8/28/2010.
The question is, does LINQ provide an interface to compare what was changed on the person entity from the old, existing one to the newly submitted one?
Or must one loop through the old entity and the new entities properties and do a comparison on each one manually?
Pseudo:
For each p as property in person
If oldEntity.p <> newEntity.p then
auditEntry = new auditEntry(oldEntity.p, newEntity.p)
end If
Next
Or, is there another/better way (implement an IComparable interface for each entity in a partial class) that can do this?