Pejman
Pejman

Reputation: 3994

Wrong url set by Breeze for getting the Metadata from ASP.NET Web API OData Service

I am working on a SPA using Durandal, Breeze and Knockout. The back-end service is provided by ASP.NET Web API OData.

I have configured the Breeze to work with OData like this:

breeze.config.initializeAdapterInstances({ dataService: "OData" });

and have set the remote service name in Breeze to 'odata'.

The thing is that the uri that Breeze calls to get the metadata is odata/$metadata whereas the uri that seems to work properly (have tested in Fiddler) is odata?$metadata.

Am I missing something?

Upvotes: 0

Views: 283

Answers (1)

Rickard Staaf
Rickard Staaf

Reputation: 2740

For Web API OData you should use:

breeze.config.initializeAdapterInstances({ dataService: "webApiOData" });

just odata is used for wcf odata.

Upvotes: 0

Related Questions