Export (0) Print
Expand All

EntitySetRights Enumeration

An enumeration used to define access rights to data that is deployed by WCF Data Services.

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

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

[FlagsAttribute]
public enum EntitySetRights

Member nameDescription
AllAuthorization to create, read, update, and delete data.
AllReadAuthorization to read data.
AllWriteAuthorization to write data.
NoneDenies all rights to access data.
ReadMultipleAuthorization to read sets of data.
ReadSingleAuthorization to read single data items.
WriteAppendAuthorization to create new data items in data sets.
WriteDeleteAuthorization to delete data items from data sets.
WriteMergeAuthorization to merge data.
WriteReplaceAuthorization to replace data.

The following example sets read-only access to all data deployed by the AccountingService.

namespace AccountingServiceWebApp
{
    public class AccountingService :
                DataService<DataModel>
    {
        config.SetResourceContainerAccessRule("*", 
                                ResourceContainerRights.AllRead);

    }
}
Show:
© 2014 Microsoft