How to introduce custom primitive key types to WCF Data Services (Astoria)

Posted by Artem Tikhomirov on Stack Overflow See other posts from Stack Overflow or by Artem Tikhomirov
Published on 2010-04-07T10:57:10Z Indexed on 2010/05/09 11:48 UTC
Read the original article Hit count: 367

Filed under:
|

Hello. We use custom type to represent Identifiers in our project. It has TypeConvertor attached and it always helped with serialization.

I've tried to use WCF Data Services to expose some data from our system, but faced a problem. Astoria framework do not recognize class as an entity even though I've decorated it with [DataServiceKey("Id")] attribute. If I change type of property to Guid - it totally works :(.

How could teach WCF Data Services to understand this simple class?

© Stack Overflow or respective owner

Related posts about OData

Related posts about wcf-data-services