Service-Enabling Data Sources
here, we provide additional information related
to the WCf data services example in order to
make the example more concrete. figure a
shows a graphical representation of the edM
model for the relational database in figure 2,
as displayed to a WCf data service developer,
along with the declarative mapping details for
the Order entity at the bottom. the navigation
properties are displayed at the bottom of each
entity type, and the connecting lines denote the
property associations between the entity types
that facilitate navigation.
Clients consuming WCf data services can
retrieve metadata describing the underlying edM
model by issuing a request to return a service’s
entity types and their relationships, for example,
http://<service _ uri>/SalesDS.
svc/$metadata
Metadata is returned in the Conceptual schema
definition language (Csdl), an example of which
is shown in figure B.
In terms of data service results in WCf, figure
C shows the results returned for the example
query in the section entitled “service-enabling
data stores,” which requested a list of the open
orders for Customer C43. the tuples retrieved
by the underlying sQl query are subsequently
transformed to the atompub result format used
by odata services, as shown in the figure. note
that the query result contains link elements that
allow the client to form navigation requests to
related entities.
figure A. An entity data model.
figure B. An oData service metadata document.
figure C. An oData service response document.