I've seen this question asked in various incarnations around the web, but never a definitive answer. And since this is the forum for definitive answers....
I am using WCF to provide the Entity objects for my Silverlight client, based on an SQL database.
I'd like to extend the class for this object on the client side only. I am interested in creating properties that make sense for binding only, and don't make sense to store in the main object. Is it possible to extend this class? If not, is there a "best practice" for doing this sort of thing?
Thanks, wTs
Generated classes actually have the modifier 'partial', so it is possible to extend them.
For example, this DataContract:
Can be extended on the client's side in this way:
Take notice of the name of namespace, it must be the same as the namespace of a service reference.