I have a class, ExpenseInfo
that includes an ICollection<String>
property:
public ICollection<String> WhoOwes { get; private set; }
I have a WCF service that returns objects of type ExpenseInfo
. I added a reference to the service in a Silverlight project within the same solution. This generated a bunch of code, including an ExpenseInfo
class within Reference.cs in the Silverlight project.
This class looks pretty good (although, if I want to add RIA validation data annotations, how can I do that?), but it's missing the WhoOwes
property. Is there some reason that it can't be sent across the wire? Do I need to represent that data another way? Or did I mess up some setting?
AFAIK C# properties semantics is not represented in the meta-data describing a web-service.
These meta-data are in the different XML schemas files (with the ".xsd" extension) generated by WCF. The same is true for the RIA attributes that you could add to your data types.
The solution is to make the client aware of them by sharing the dll that embeds the types. You could create a third project "Data" to hold your data classes and reference it from both the server and client projects.