.NET Framework Class Library
IDataServiceConfiguration Interface

The IDataServiceConfiguration is used by ADO.NET Data Services to set up the behavior of the service, including rights on entity sets and service operations, limits on the allowed requests, registering types not discoverable by default, and the default verbosity on error handling.

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

Visual Basic (Declaration)
Public Interface IDataServiceConfiguration
Visual Basic (Usage)
Dim instance As IDataServiceConfiguration
C#
public interface IDataServiceConfiguration
Visual C++
public interface class IDataServiceConfiguration
JScript
public interface IDataServiceConfiguration
Remarks

This type is used by DataService<(Of <(T>)>) classes to configure the service by implementing a static method named InitializeService, returning void, and taking a single argument of type IDataServiceConfiguration. The configuration object may only be used during the call to service initialization.

Examples

The following example shows initialization of an ADO.NET Data Service and configuration of access rights to all resource sets and the service operation OrdersByCity.

public static void InitializeService(IDataServiceConfiguration config)
    {
       // Entity sets access configuration.
        config.SetEntitySetAccessRule("*", EntitySetRights.AllRead);

        // Service operations access configuration.
        config.SetServiceOperationAccessRule("OrdersByCity",
                  ServiceOperationRights.All);
    }

Platforms

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.
Version Information

.NET Framework

Supported in: 3.5 SP1
See Also

Reference

Tags :


Page view tracker