Reputation: 219
i am having 2 tables Content and Channel. content having the navigation property of channel
i have created a method "GetContentsOfChannel" in data service which takes channelID as para and return all the contents of that channelID
by executing below uri i am getting all the contents of that channel id
http://localhost:28553/WNADataService.svc/GetContentsOfChannel?channelID=37
but i also want the channel details for each content when i tried with $expand i am getting error
http://localhost:28553/WNADataService.svc/GetContentsOfChannel?channelID=37$expand=Channels
is i am missing some thing or there is any other way by which i can get all the details
please help me
Upvotes: 0
Views: 489
Reputation: 17579
it should be http://localhost:28553/WNADataService.svc/GetContentsOfChannel?channelID=37&$expand=Channels
& in order to add new param to query string $expand - OData param name to load related entity
Upvotes: 1