Skip to Content
ASP.NET 4 Unleashed
book

ASP.NET 4 Unleashed

by Stephen Walther, Kevin Hoffman, Nate Dudek
October 2010
Intermediate to advanced
1920 pages
73h 55m
English
Sams
Content preview from ASP.NET 4 Unleashed

Using Data Services with a Data Context

In the previous section, we built a sample application that displays the kill log from a fictional video game called Zombie Killa. This kill log is exposed as a WCF Data Service, and we communicated with that service through an automatically generated proxy class.

In this section, we take a look at how we can talk to the WCF Data Service without using any generated code or classes by using the DataServiceContext class directly.

As with the generated proxy, we create an instance of the proxy by providing it with the URL of the WCF Data Service. After that, we can create our own queries (and make changes, inserts, and deletes) by invoking various methods on the context. In the code in Listing 21.4, we call ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

ASP.NET 3.5 Unleashed

ASP.NET 3.5 Unleashed

Stephen Walther
ASP.NET 4.0 in Practice

ASP.NET 4.0 in Practice

Marco De Sanctis, Daniele Bochicchio, Stefano Mostarda

Publisher Resources

ISBN: 9780132565851Purchase book