Database Reference
In-Depth Information
URI by appending the number 113 to the end of the URI enclosed in parenthesis, as shown in Figure 6-
20.
By loading the URI which includes the id of a specific record, I can now drill down further and
return just the record I am looking for. This is just like applying a WHERE clause to a T-SQL query, in this
case WHERE ID = 113 . In this case I have queried the underlying store for a specific user by passing the
appropriate ID in the URI.
Additionally I can return a specific field by adding the field I want to the URI, such as:
http://localhost:51176/TechBioDataService.svc/Users(113)/Name
Specifying the specific field along with the id will return just the field you request. In the code
snipped above, the value in the Name column for User ID 113 is returned, as shown in Figure 6-21.
You can also use this same methodology to navigate between tables. For example, you could do the
following to return documents for a specific User ID:
http://localhost:51176/TechBioDataService.svc/Users(113)/Docs
Figure 6-19. Viewing All Users
Search WWH ::




Custom Search