In our Smartclient app we currently use PostSharp to inject get/set code into auto properties to implement Dirty state tracking and INotifyPropertyChanged events.
We often use these business objects with LinqToSql. We'd like to remove this dependency on Postsharp, and the .Net 4.0 ExpandoObject looks perfect. We can add dynamic properties and add custom get/set code without having to repeat it on every property for the HasChanged() implementation.
My question is this; How do we get instances of dynamic ExpandoObject from LinqToSql? Is it at all possible?
If not, is there some other way this can be achieved? we basically have business objects with 50-100 properties on each, and need to implement INotifyPropertyChanged without hundreds of lines of repetitious code