English 中文(简体)
如果我使用哪一个实体的权利计算方法
原标题:Which EntitySetRights Enumeration should I use

我有以下要求:

  • users should not be able to insert or delete from Orders entities
  • users are able to update or replace Orders entities

哪一部法典更适合:

config.SetEntitySetAccessRule ("Orders", EntitySetRights.WriteMerge | 
EntitySetRights.WriteReplace);

config.SetEntitySetAccessRule ("Orders",  EntitySetRights.AllWrite);

And what is the difference between: EntitySetRights.AllWrite EntitySetRights.All ????

最佳回答

I think this documentation sumarizes it pretty well: http://msdn.microsoft.com/en-us/library/system.data.services.entitysetrights.aspx WriteMerge allows MERGE operations. WriteReplace allows PUT operations. AllWrite allows POST/PUT/MERGE/DELETE but doesn t allow any GET. All allows everything. Looking it your requirements you need at least AllWrite, if you also want to allow querying you would need to add either ReadSingle or ReadMultiple or both (in which case All is easier).

问题回答

暂无回答




相关问题
WCF DataMember Serializing questions

Ok, so I was part way through the long winded process of creating DTOs for sending my model over the wire and I don t feel like I m going down the right route. My issue is that most of the entities ...

Access WCF service on same server

I have a .NET website with a WCF service. How do I access the current operations context of my service? One possible work around is to just make a call to the service within the app...but that seems ...

WCF binding error

So I got into work early today and got the latest from source control. When I try to launch our ASP.NET application, I get this exception: "The binding at system.serviceModel/bindings/wsHttpBinding ...

The service operation requires a transaction to be flowed

I am facing strange issue with our WCF service. The same code was working fine until recently we added more OperationContracts(Web Methods). We have common 3 tier architecture. DAL (WCF) BLL Web ...

热门标签