Guys, greate work. I hope you will keep it this way. I've just faced the same problems
Some suggestions for the code generator:
- Avoid generating DbType, & Storage attributes to further reduce bloat.
- Generate private fields without preceding "_" and in camelCase .
- Add [Serializable] to the class, so it can be used with binaryFormatter / netdatacontract serializer.
Not sure about thesee two, but just thoughts:
- Keep INotifyPropertyChanged - for perfomance & ease of change tracking on client?
- Keep the code that ensures object graph consistency? It's a good thing? This could be done by using some kind of custom collection (possibly list or Collection<T> derivered)
And the last one, just an idea:
- You can still provide lazy loading (when using custom collections) by reimplementing some kind of EntitySet / Ref and setting the source in a constructor. During serialization unloaded properties will return null (using the same trick as in LTS generated
code) . I don't get why microsoft didn't do that. And this automatically will give lazy load on deserialized and attached entities.