.NET Framework Class Library
ServiceOperationRights Enumeration

An enumeration used to define access rights to service operations deployed by ADO.NET Data Services.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

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

Visual Basic (Declaration)
<FlagsAttribute> _
Public Enumeration ServiceOperationRights
Visual Basic (Usage)
Dim instance As ServiceOperationRights
C#
[FlagsAttribute]
public enum ServiceOperationRights
Visual C++
[FlagsAttribute]
public enum class ServiceOperationRights
JScript
public enum ServiceOperationRights
Members

Member nameDescription
NoneNo authorization to access the service operation.
ReadSingleAuthorization to read a single data item by using the service operation.
ReadMultipleAuthorization to read multiple data items by using the service operation.
AllReadAuthorization to read single or multiple data items deployed by the service operation.
AllAll rights assigned to the service operation..
Examples

The following example sets all rights access to the service operation OrdersByCity.

namespace AccountingServiceWebApp
{
  public class AccountingService : DataService<DataModel>
  {
      public static void InitializeService(IDataServiceConfiguration config)
      {
          config.SetServiceOperationAccessRule("OrdersInCity", ServiceOperationRights.All);
      }
      public IQueryable<Orders> OrdersByCity(string city)
      {
          return this.CurrentDataSource.Orders.Where(o => o.ShippingCity == city);
      }
  }
}

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