Created
August 30, 2010 12:28
-
-
Save alexyork/557343 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Calling a WCF Data Service with jQuery | |
// | |
// This will generate a URL like this... | |
// http://example.com/Products.svc/Customers(1234)/Orders?$skip=10&top=10 | |
// ... and pass the JSON data result to your callback function | |
$.fromServiceUrl("http://example.com/Products.svc") | |
.queryTable("Customers", 1234) | |
.withRelation("Orders") | |
.skip(10) | |
.take(10) | |
.onSuccess(successCallback) | |
.onError(errorCallback) | |
.run(); | |
// Of course, your callback function can be using jQuery templating | |
// to render the JSON to HTML |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment