Udostępnij za pośrednictwem


What's New in WCF Data Services

The following new Open Data Protocol (OData) version 2.0 functionality is supported in this release of WCF Data Services:

  • Counting entities in an entity set
    A new $count path segment enables you to receive only the total number of resources returned by a URI. A new $inlinecount query option enables you to receive the same total resource count together with the resource data in a single response. For more information, see OData: URI Conventions.

    The .NET Framework client library now enables you to access this row count information in a query response in your application. For more information, see Querying the Data Service (WCF Data Services).

  • Query Projections
    Query results can now be modified to include only a subset of properties by using the new $select query option. For more information, see OData: URI Conventions.

    The .NET Framework client library now supports projection by using the select clause (Select in Visual Basic) in a LINQ query. For more information, see Query Projections (WCF Data Services).

The following functionality is provided by the version of WCF Data Services in the .NET Framework 4:

  • Streaming of binary resources
    An entity can be defined as media link entry, with a link to an associated media resource. This enables you to retrieve and save binary large object data independent of the entity to which it belongs. You can create a data service that returns binary property data as a stream instead of first loading the entire entity, including binary data, into memory. Do this by implementing the IDataServiceStreamProvider interface.

    The .NET Framework client library now allows you to get and set binary properties as a data stream. For more information, see Loading Deferred Content (WCF Data Services).

  • Feed Customization
    WCF Data Services enables you to customize feeds retuned by the data service by defining an alternate entity-property mapping for an Atom payload. For more information, see Feed Customization (WCF Data Services).
  • Custom data service providers
    By implementing a set of new data service provider interfaces, you can use various types of data with a data service, even when the data model changes during execution. For more information, see Custom Data Service Providers (WCF Data Services).

See Also

Concepts

WCF Data Services Overview
Getting Started with WCF Data Services