Ejemplo n.º 1
0
		public static void InitializeService(DataServiceConfiguration config)
		{
			config.SetEntitySetAccessRule("*", EntitySetRights.All);
			config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V3;
			config.DataServiceBehavior.AcceptProjectionRequests = true;
			config.UseVerboseErrors = true;
			config.SetEntitySetPageSize("*", DataServiceController.Current.Configuration.GetResultSetLimit("*"));
			foreach (DSConfiguration.WcfConfigElement entitySet in DataServiceController.Current.Configuration.DataServicesConfig.EntitySets)
			{
				config.SetEntitySetPageSize(entitySet.Name, entitySet.MaxResults);
			}
			config.MaxExpandCount = DataServiceController.Current.Configuration.DataServicesConfig.MaxExpandCount;
			config.MaxExpandDepth = DataServiceController.Current.Configuration.DataServicesConfig.MaxExpandDepth;
			config.DataServiceBehavior.AcceptAnyAllRequests = true;
			config.DataServiceBehavior.AcceptSpatialLiteralsInQuery = false;
		}