locked
data and navigation properties RRS feed

  • Question

  • Hi

    I have a call that returns the following data. Is it possible to only return the data not the navigation properties. This would make the data a lot smaller to transfer.


    {"d":[{"__metadata":{"id":"http://localhost/MyService.svc/Users(107)","uri":"http://localhost/MyService.svc/Users(107)","type":"MyModel.User"},"Items1":{"__deferred":{"uri":"http://localhost/MyService.svc/Users(107)/Items1"}},"Outages":{"__deferred":{"uri":"http://localhost/MyService.svc/Users(107)/Outages"}},"Info":{"__deferred":{"uri":"http://localhost/MyService.svc/Users(107)/Info"}},"tblActionLogs":{"__deferred":{"uri":"http://localhost/MyService.svc/Users(107)/tblActionLogs"}},"tblStations":{"__deferred":{"uri":"http://localhost/MyService.svc/Users(107)/tblStations"}},"UserId":107,"Name":"fred blogs","DisplayName":"Me","ModifiedTimestampUTC":"\/Date(1320065940357)\/","IsActive":true,"Timestamp":"AAAAAAAXcAI="}]}

    Friday, September 7, 2012 11:49 AM

Answers

  • You can use $select to limit the properties sent in the response. It applies to both normal as well as navigation properties.

    Thanks,


    Vitek Karas [MSFT]

    Friday, September 7, 2012 3:08 PM
    Moderator