How to configure Upshot.js for OData service?

In the Upshot.js library, which is part of the http://www.asp.net/single-page-application ASP.NET MVC 4 Beta function, how can this be configured to work with the OData service developed using WCF data services?

The source code contains "upshot.ODataDataProvider"; how can i use it?

+5
source share
1 answer

I have an example project that you can check that has an OData working test: https://github.com/Marcus-L/Test-Upshot

Here's the code snippet:

upshot.dataSources = upshot.dataSources || {};
upshot.dataSources.ParentThings = upshot.RemoteDataSource({
  provider: upshot.ODataDataProvider,
  providerParameters: { url: "/OData.svc", operationName: "ParentThings", operationParameters: { $expand: "Children"} },
  bufferChanges: true,
  dataContext: undefined,
  mapping: {}
});
upshot.dataSources.ParentThings.refresh();
+1
source

All Articles