title: WCF Data Service not exposing service operations
body: <p>I am making some POC using the Open Data Protocol (OData). My objective is to expose some custom methods as service operations along with entities but they are not displayed while being reachable.</p>
  
  <pre><code>namespace WebApplication1
  {
      public class WcfDataService2 : DataService&lt;MyDataSourceProvider&gt;
      {
          public static void InitializeService(DataServiceConfiguration config)
          {
              config.SetEntitySetAccessRule("MyProducts", EntitySetRights.AllRead);
              config.SetEntitySetAccessRule("MySuppliers", EntitySetRights.AllRead);
              config.SetEntitySetAccessRule("MyLondonSuppliers", EntitySetRights.AllRead);
  
              config.SetServiceOperationAccessRule("GetSuppliersByCity", ServiceOperationRights.AllRead);
              config.SetServiceOperationAccessRule("LondonSuppliers", ServiceOperationRights.AllRead);
              config.SetServiceOperationAccessRule("UpdateProductName", ServiceOperationRights.All);
  
              config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;
          }
  
          [WebGet]
          public IQueryable&lt;Supplier&gt; GetSuppliersByCity(string city)
          {
              return DataRepository.Suppliers.Where(s =&gt; s.Town.ToLower().Contains(city.ToLower())).AsQueryable();
          }
  
          [WebGet]
          public IQueryable&lt;Supplier&gt; LondonSuppliers()
          {
              return DataRepository.Suppliers.Where(s =&gt; s.County == "London").AsQueryable();
          }
  
          [WebGet]
          public string UpdateProductName(int ID, string Name)
          {
              DataRepository.Products.First(p =&gt; p.ProductID == ID).Name = Name;
              return "ok";
          }
      }
  }
  </code></pre>
  
  <p>When I query the service at <code>http://localhost:51696/WcfDataService2.svc/</code>, all I see are the entities:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" standalone="yes"?&gt;
  &lt;service xml:base="http://localhost:51696/WcfDataService2.svc/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns="http://www.w3.org/2007/app"&gt;
    &lt;workspace&gt;
      &lt;atom:title&gt;Default&lt;/atom:title&gt;
      &lt;collection href="MyProducts"&gt;
        &lt;atom:title&gt;MyProducts&lt;/atom:title&gt;
      &lt;/collection&gt;
      &lt;collection href="MySuppliers"&gt;
        &lt;atom:title&gt;MySuppliers&lt;/atom:title&gt;
      &lt;/collection&gt;
      &lt;collection href="MyLondonSuppliers"&gt;
        &lt;atom:title&gt;MyLondonSuppliers&lt;/atom:title&gt;
      &lt;/collection&gt;
    &lt;/workspace&gt;
  &lt;/service&gt;
  </code></pre>
  
  <p>No trace of the methods:</p>
  
  <ul>
  <li>GetSuppliersByCity</li>
  <li>LondonSuppliers</li>
  <li>UpdateProductName</li>
  </ul>
  
  <p>Am I missing something?</p>
  
  <p>By the way, I'm using Visual Studio 2010 with .NET 4.0.</p>