Rahul Parate
Rahul Parate

Reputation: 219

Wcf data service $expand issue

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

Answers (2)

vittore
vittore

Reputation: 17579

it should be http://localhost:28553/WNADataService.svc/GetContentsOfChannel?channelID=37&$exp‌​and=Channels

& in order to add new param to query string $expand - OData param name to load related entity

Upvotes: 1

Amar Palsapure
Amar Palsapure

Reputation: 9680

Try using & insteadof $

Hope this helps.

Upvotes: 0

Related Questions