title: OData v4 Function always returns 404
body: <p>Trying to move from <strong>OData v3</strong> to <strong>OData v4</strong>. Why do I keep getting a <strong>404</strong> when trying to use <strong>OData Functions</strong>?</p>
  
  <p><strong>Web API Config:</strong></p>
  
  <pre><code>ODataModelBuilder builder = new ODataConventionModelBuilder();
  //etc
  builder.EntitySet&lt;LocalizableString&gt;("LocalizableStringApi");
  //etc
  var getComparitiveTableFunction = builder.EntityType&lt;LocalizableString&gt;().Collection.Function("GetComparitiveTable");
  getComparitiveTableFunction.Parameter&lt;string&gt;("cultureCode");
  getComparitiveTableFunction.ReturnsCollection&lt;ComparitiveLocalizableString&gt;();
  //etc
  config.MapODataServiceRoute("OData_Kore_CMS", "odata/kore/cms", builder.GetEdmModel());
  </code></pre>
  
  <p><strong>C# Code:</strong></p>
  
  <pre><code>[EnableQuery(AllowedQueryOptions = AllowedQueryOptions.All)]
  [HttpGet]
  //[ODataRoute("Default.GetComparitiveTable(cultureCode={cultureCode})")] // Tried this, but gets errors and I noticed the function is in the OData model anyway without this, so should be fine.
  public virtual IHttpActionResult GetComparitiveTable([FromODataUri] string cultureCode)
  {
      // Implementation
      return Ok(query);
  }
  </code></pre>
  
  <p><strong>XML Returned from $metadata:</strong></p>
  
  <pre><code>&lt;Schema Namespace="Default"&gt;
      &lt;Function Name="GetComparitiveTable" IsBound="true"&gt;
          &lt;Parameter Name="bindingParameter" Type="Collection(Kore.Localization.Domain.LocalizableString)"/&gt;
          &lt;Parameter Name="cultureCode" Type="Edm.String" Unicode="false"/&gt;
          &lt;ReturnType Type="Collection(Kore.Localization.Models.ComparitiveLocalizableString)"/&gt;
      &lt;/Function&gt;
      ...
  </code></pre>
  
  <p>As you can see, it's in the schema / OData model... yet the following query does not work:</p>
  
  <pre><code>http://localhost:30863/odata/kore/cms/LocalizableStringApi/Default.GetComparitiveTable(cultureCode='en-US')
  </code></pre>
  
  <p>I have also tried the following:</p>
  
  <pre><code>http://localhost:30863/odata/kore/cms/LocalizableStringApi/GetComparitiveTable(cultureCode='en-US')
  http://localhost:30863/odata/kore/cms/Default.GetComparitiveTable(cultureCode='en-US')
  http://localhost:30863/odata/kore/cms/GetComparitiveTable(cultureCode='en-US')
  </code></pre>
  
  <p>All of the above result in a <strong>404</strong>.</p>
  
  <p>So... what am I doing wrong here?</p>