Data Service Providers (WCF Data Services)

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 (WCF Data Services).

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 (WCF Data Services).

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 (WCF Data Services).

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 (WCF Data Services).

Action Provider

This provider defines a service action. Service actions enable you to invoke business logic in OData, where the logic must be bound to a give resource. An action provider is created by implementing the IDataServiceActionProvider interface. For more information, see Using OData Actions to implement server-side behavior.

See Also

Concepts

Configuring the Data Service (WCF Data Services)

Hosting the Data Service (WCF Data Services)

Other Resources

Data Service (WCF Data Services)