DataService<T> Class

Represents a strongly typed service that can process data-oriented resource requests.


Namespace:  System.Data.Services
Assembly:  Microsoft.Data.Services (in Microsoft.Data.Services.dll)

[AspNetCompatibilityRequirementsAttribute(RequirementsMode = )]
[ServiceBehaviorAttribute(InstanceContextMode = )]
public class DataService<T> : IRequestHandler

Type Parameters


The type of the store to provide resources.

The DataService<T> type exposes the following members.

Public methodDataService<T>Creates a new data service that deploys data of the type indicated by the template class.

Protected propertyCurrentDataSourceGets the data source instance currently being used to process the request.
Public propertyODataWriterFactoryPublic func to wrap the current DataServiceODataWriter with custom one to intercept WCF Data Services calls to ODataWriter. This enables seeing the ODataFeed/ODataEntry/ ODataNavigationLink instances that gets passed to underlying instance.
Public propertyProcessingPipelineGets an object that defines the events for the data service processing pipeline.

Public methodAttachHostAttaches the data service host to the data service identified by the parameter host.
Protected methodCreateDataSourceCreates a data source of the template class that will be used by the data service.
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodHandleExceptionCalled when an exception is raised while processing a request.
Protected methodMemberwiseClone (Inherited from Object.)
Protected methodOnStartProcessingRequestCalled before processing each request. For batch requests, it is called one time for the top batch request and one time for each operation in the batch.
Public methodProcessRequestProcesses an request.
Public methodProcessRequestForMessageProcesses an HTTP request.
Public methodToString (Inherited from Object.)

T will typically be a subtype of ObjectContext or another class that provides IQueryable properties.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.