locked
Mapping properties using attributes in the client library RRS feed

  • Question

  • Hi,

    In the client library (System.Data.Services.Client), currently, the names of the CLR properties are used as the property name in the OData message. Is there a way of controlling the serialization using attributes, to map a property on our .NET object to a OData property with a different name?

    Thanks

    Saturday, April 17, 2010 8:34 PM

Answers

  • Hi fcharlon,

     The client library doesnt support DataContract type attributes on the Client types for Serialization and De-Serialization of feeds.
     You can use projections to reshape a query, but that requires you have both the original and the re-mapped types on the client. 
     Short answer - Not today , sorry.

     You can request this feature on our connect site here :

    https://connect.microsoft.com/data/SearchResults.aspx?SearchQuery=WCF%2bData%2bServices


    Phani Raj Astoria http://blogs.msdn.com/PhaniRaj
    Sunday, April 18, 2010 6:26 AM
    Moderator