I have a simple WCF Data Services service and I want to expose a Service Operation as follows:
[System.ServiceModel.ServiceBehavior(IncludeExceptionDetailInFaults = true)]
public class ProductDataService : DataService<ProductRepository>
{
// This method is called only once to initialize service-wide policies.
public static void InitializeService(IDataServiceConfiguration config)
{
config.SetEntitySetAccessRule("*",
EntitySetRights.ReadMultiple | EntitySetRights.ReadSingle);
config.SetServiceOperationAccessRule("*",
ServiceOperationRights.All);
config.UseVerboseErrors = true;
}
// This operation isn't getting generated client side
[WebGet]
public IQueryable<Product> GetProducts()
{
// Simple example for testing
return (new ProductRepository()).Product;
}
Why isn't the GetProducts
method visible when I add the service reference on the client?
I'm running Visual Studio 2008 SP1 and .NET Framework 3.5 SP1. I also downloaded and installed this update: