How should I structure my code so that Where to declare the data entity and share it between the project containing the WCF service and any Silverlight application that references it? I want to eliminate the version of the data entity generated by the proxy.
I have one through WCF A custom data entity (data object) exposed by the web service. The WCF service exists in the web application. Then, I have a Silverlight application that contains a service reference to that WCF service. When I add the service reference, it will be generated Proxy, and the proxy includes a version of the custom data entity.
How should I structure my code to declare the data entity in one place, and in the project containing the WCF service and the reference to it Sharing between any Silverlight applications? I want to eliminate the version of the data entity generated using the proxy.
There is a good example how to do this here by Pete Brown. Using this method, You can use the same class in Silverlight client and WCF service without using generated objects.