I have an IUserType that maps a class to a database column. I can't figure out how to properly deal with dirtyness though. Since when a user edits a property of the class, they do not create a new instance of it. Thus Equals receives the same instance twice. And it's always equal.
I'm wondering about some hack, like storing the data on the class twice, so I can have 'old data' to compare to, and then hacking up Equals. I don't like that though. I'd appreciate something like IsDirty on IUserType, that I could return true from if the property has changed.
|