Why does the $metadata only return Customer, Order, and Order_Detail? Why doesn't this work: http://localhos
t:<PORT>/Northw ind.svc/Product s ??? Products are in the NorthwindEntiti es. Why are they not exposed?
You must explicitly expose entity sets as feeds in the InitializeServi
ce method of the data service. The following code in Northwind.svc.c s exposes those three feeds: config.SetEntit ySetAccessRule( "Orders", EntitySetRights .AllRead | EntitySetRights .WriteMerge | EntitySetRights .WriteReplace); config.SetEntit ySetAccessRule( "Order_Details" , EntitySetRights .AllRead | EntitySetRights .AllWrite); config.SetEntit ySetAccessRule( "Customers", EntitySetRights .AllRead); The wildcard (*) is supported for selecting entity sets: config.SetEntit ySetAccessRule( "*", EntitySetRights .AllRead); This makes it easy to assign accessibility to all entity sets in the data model at once, but I find it's better to set them individually.
My old project used entity framework 22.214.171.124 and WCF (WCFDataService
s_Mar2011_CTP2) , my entity can be exposed but cannot be updated. So I try to replace WCFCTP2 with WCF 5.0, but my entity cannot be exposed now. It looks WCF 5.0 has some problems with entity framework 126.96.36.199. I wonder is there a work around for such situation? Thank you!
If I call a service operation from a browser I am able to get entities back, but when I consume the service operation in a client app I am not getting back the entities.
After I recreate a new project, everything is fine now!
I was wondering is their already a sample for windows phone 7 in which a WCF service is consumed? Or if not can you create a sample or would consuming the one here be about the same?
I don't think that there is yet an OData v3 client that supports Windows Phone 7. There is a client for Win8 Metro apps that is included in the Visual Studio 2012 RC (but not Express) on Windows 8. I have published other WP7 apps that use the OData v2 client.