Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
DataService<(Of <(T>)>) Class

The main entry point for developing an ADO.NET Data Service. The DataService<(Of <(T>)>) class does the basic integration of all components of the server system.

Namespace:  System.Data.Services
Assembly:  System.Data.Services (in System.Data.Services.dll)
Visual Basic (Declaration)
<ServiceBehaviorAttribute(InstanceContextMode := InstanceContextMode.PerCall)> _
<AspNetCompatibilityRequirementsAttribute(RequirementsMode := AspNetCompatibilityRequirementsMode.Allowed)> _
Public Class DataService(Of T) _
    Implements IRequestHandler
Visual Basic (Usage)
Dim instance As DataService(Of T)
C#
[ServiceBehaviorAttribute(InstanceContextMode = InstanceContextMode.PerCall)]
[AspNetCompatibilityRequirementsAttribute(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class DataService<T> : IRequestHandler
Visual C++
[ServiceBehaviorAttribute(InstanceContextMode = InstanceContextMode::PerCall)]
[AspNetCompatibilityRequirementsAttribute(RequirementsMode = AspNetCompatibilityRequirementsMode::Allowed)]
generic<typename T>
public ref class DataService : IRequestHandler
JScript
JScript does not support generic types or methods.

Type Parameters

T

A new data service that uses system defaults for authorization and caching is created by defining a class that derives from the DataService<(Of <(T>)>) class and by referencing a compatible data model.

The following example declares a new data service that uses data defined by the AdventureworksEntities object context.

namespace AventureworksService
{

    public class AdventureworksSales :
           DataService<AdventureworksEntities>
    { } 

}

System..::.Object
  System.Data.Services..::.DataService<(Of <(T>)>)
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5 SP1
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker