EntitySetRights 枚举

定义

用于定义对 WCF Data Services 所部署数据的访问权限的枚举。An enumeration used to define access rights to data that is deployed by WCF Data Services.

此枚举有一个 FlagsAttribute 属性,允许按位组合成员值。

public enum class EntitySetRights
[System.Flags]
public enum EntitySetRights
type EntitySetRights = 
Public Enum EntitySetRights
继承
EntitySetRights
属性

字段

All 63

授权创建、读取、更新和删除数据。Authorization to create, read, update, and delete data.

AllRead 3

授权读取数据。Authorization to read data.

AllWrite 60

授权写入数据。Authorization to write data.

None 0

拒绝所有数据访问权限。Denies all rights to access data.

ReadMultiple 2

授权读取数据集。Authorization to read sets of data.

ReadSingle 1

授权读取单一数据项。Authorization to read single data items.

WriteAppend 4

授权在数据集中创建新数据项。Authorization to create new data items in data sets.

WriteDelete 16

授权从数据集中删除数据项。Authorization to delete data items from data sets.

WriteMerge 32

授权合并数据。Authorization to merge data.

WriteReplace 8

授权替换数据。Authorization to replace data.

示例

下面的示例设置对部署的AccountingService所有数据的只读访问。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);  
  
    }  
}  
  

适用于