DataService<T> Class

 

The main entry point for developing an ADO.NET Data Service.

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

System.Object
  System.Data.Services.DataService<T>

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

Type Parameters

T

Type that defines the data service.

NameDescription
System_CAPS_pubmethodDataService<T>()

Creates a new data service that deploys data of the type indicated by the template class.

NameDescription
System_CAPS_protpropertyCurrentDataSource

Gets the data source instance currently being used to process the request.

System_CAPS_pubpropertyProcessingPipeline

Gets an object that defines the events for the data service processing pipeline.

NameDescription
System_CAPS_pubmethodAttachHost(IDataServiceHost)

Attaches the data service host to the data service identified by the parameter host.

System_CAPS_protmethodCreateDataSource()

Creates a data source of the template class that will be used by the data service.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodHandleException(HandleExceptionArgs)

Called when an exception is raised while processing a request.

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodOnStartProcessingRequest(ProcessRequestArgs)

Called 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.

System_CAPS_pubmethodProcessRequest()

Processes an HTTP request.

System_CAPS_pubmethodProcessRequestForMessage(Stream)

Processes an HTTP request.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

The DataService<T> class does the basic integration of all components of the server system. A new data service that uses system defaults for authorization and caching is created by defining a class that derives from the DataService<T> class and by referencing a compatible data model.

The type of the DataService<T> must expose at least one property that returns an entity set that is an IQueryable<T> collection of entity types. This class must also implement the IUpdatable interface to enable updates to be made to entity resources.

.NET Framework
Available since 3.5

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

Return to top
Show: