My Init method looks like this
public static void InitializeService(DataServiceConfiguration config)
{
config.UseVerboseErrors = true;
config.SetEntitySetAccessRule("*", EntitySetRights.AllRead);
config.SetServiceOperationAccessRule("*", ServiceOperationRights.AllRead);
config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;
}
However, I know there is a way to limit the client from seeing the 100 entities in my data model. I only want to expose four! Maybe the Init() methods has nothing to do with it. How do you do it?
You can remove the line
and replace it with setting the desired access on your individual entity sets.
Example here: MSDN: DataServiceConfiguration.SetEntitySetAccessRule Method