Partager via


Data Services Providers (WCF Data Services)

Important

WCF Data Services has been deprecated and will no longer be available for download from the Microsoft Download Center. WCF Data Services supported earlier versions of the Microsoft OData (V1-V3) protocol only and has not been under active development. OData V1-V3 has been superseded by OData V4, which is an industry standard published by OASIS and ratified by ISO. OData V4 is supported through the OData V4 compliant core libraries available at Microsoft.OData.Core. Support documentation is available at OData.Net, and the OData V4 service libraries are available at Microsoft.AspNetCore.OData.

RESTier is the successor to WCF Data Services. RESTier helps you bootstrap a standardized, queryable, HTTP-based REST interface in minutes. Like WCF Data Services before it, Restier provides simple and straightforward ways to shape queries and intercept submissions before and after they hit the database. And like Web API + OData, you still have the flexibility to add your own custom queries and actions with techniques you're already familiar with.

WCF Data Services supports multiple provider models for exposing data as an Open Data Protocol (OData) feed. This topic provides information to enable you to select the best WCF Data Services provider for your data source.

Data Source Providers

WCF Data Services supports the following providers for defining the data model of a data service.

Provider Description
Entity Framework provider This provider uses the ADO.NET Entity Framework to enable you to use relational data with a data service by defining a data model that maps to relational data. Your data source can be SQL Server or any other data source with third-party provider support for the Entity Framework. You should use the Entity Framework provider when you have a relational data source, such as a SQL Server database. For more information, see Entity Framework Provider.
Reflection provider This provider uses reflection to enable you to define a data model based on existing data classes that can be exposed as instances of the IQueryable<T> interface. Updates are enabled by implementing the IUpdatable interface. You should use this provider when you have static data classes that are defined at runtime, such as those generated by LINQ to SQL or defined by a typed DataSet. For more information, see Reflection Provider.
Custom Data Service Providers WCF Data Services includes a set of providers that enable you to dynamically define a data model based on late-bound data types. You should implement these interfaces when the data being exposed is not known when the application is being designed or when the Entity Framework or reflection providers are not sufficient. For more information, see Custom Data Service Providers.

Other Data Service Providers

WCF Data Services has the following additional data service provider that enhances the performance of a data source defined by using one of the other providers.

Provider Description
Streaming provider This provider enables you to expose binary large object data types by using WCF Data Services. A streaming provider is created by implementing the IDataServiceStreamProvider interface. This provider can be implemented together with any data source provider. For more information, see Streaming Provider.

See also