title: Invalid OData path and Invalid action error
body: <p>I am trying to create a ODataController and have it like so:</p>
  
  <pre><code>public class ProductSetController : ODataController
  {
      public IQueryable&lt;ProductRef&gt; GetAllProducts(string StoreId, string flag)
      {
              long lStoreId = Convert.ToInt64(StoreId);
  
              var featuredProducts = (from b in new SomeContext().SomeInfluence
                                      where b.SomeInfluenceTypeId == 1234 &amp;&amp; b.StoreId == lStoreId &amp;&amp; b.IsDeleted == false
                                      select b.ProductId).ToList();
  
              return (from b in new OProdctSubscriptionContext(lStoreId).ProductRef where featuredProducts.Contains(b.ProductId) select b).AsQueryable();
  
  
      }
  }
  </code></pre>
  
  <p>And this in WebApiConfig's Register method:</p>
  
  <pre><code>        ODataConventionModelBuilder builder = new ODataConventionModelBuilder();
          builder.EntitySet&lt;ProductRef&gt;("ProductSet");
          config.Routes.MapODataRoute("ODataRoute", "odata", builder.GetEdmModel());
  </code></pre>
  
  <p>To test it I made a call like so:</p>
  
  <pre><code>http://localhost:32944/odata/ProductSet/GetAllProducts?StoreId=5010&amp;flag="N"
  </code></pre>
  
  <p>The browser printed out this error:</p>
  
  <blockquote>
    <p>{"$id":"1","Message":"The OData path is
    invalid.","ExceptionMessage":"Invalid action detected.
    'GetAllProducts' is not an action that can bind to
    'Collection([Entities.OpenApi.Products.ProductRef
    Nullable=False])'.","ExceptionType":"Microsoft.Data.OData.ODataException","StackTrace":"
    at
    System.Web.Http.OData.Routing.DefaultODataPathHandler.ParseAtEntityCollection(IEdmModel
    model, ODataPathSegment previous, IEdmType previousEdmType, String
    segment)\r\n   at
    System.Web.Http.OData.Routing.DefaultODataPathHandler.ParseAtCollection(IEdmModel
    model, ODataPathSegment previous, IEdmType previousEdmType, String
    segment)\r\n   at
    System.Web.Http.OData.Routing.DefaultODataPathHandler.ParseNextSegment(IEdmModel
    model, ODataPathSegment previous, IEdmType previousEdmType, String
    segment)\r\n   at
    System.Web.Http.OData.Routing.DefaultODataPathHandler.Parse(IEdmModel
    model, String odataPath)\r\n   at
    System.Web.Http.OData.Routing.ODataPathRouteConstraint.Match(HttpRequestMessage
    request, IHttpRoute route, String parameterName, IDictionary`2 values,
    HttpRouteDirection routeDirection)"}</p>
  </blockquote>
  
  <p>What am I missing?</p>
  
  <p>Any help is greatly appreciated.</p>
  
  <p>Regards.</p>