title: No routing convention was found to select an action for the OData path with template '~/entityset/key/unresolved'
body: <p>I have defined a OData function as below:</p>
  
  <pre><code>var function = builder.EntityType&lt;User&gt;().Function("GetContacts").ReturnsCollectionFromEntitySet&lt;Contact&gt;("Contacts");
  </code></pre>
  
  <p>I have then defined a method on my UsersController as below:</p>
  
  <pre><code>[HttpGet]
  [ODataRoute("Users({key})/Default.GetContacts()")]
  public IHttpActionResult GetContacts([FromODataUri]Guid key)
  {
      return Ok();
  }
  </code></pre>
  
  <p>On trying to access this from a client:</p>
  
  <p><a href="http://localhost/odata/Users(874C0BC3-6D9B-4DFA-B42C-8403FE1B281D)/GetContacts" rel="nofollow noreferrer">http://localhost/odata/Users(874C0BC3-6D9B-4DFA-B42C-8403FE1B281D)/GetContacts</a></p>
  
  <p>The controller is hit but the method isn't, instead in postman I get back an exception "No routing convention was found to select an action for the OData path with template '~/entityset/key/unresolved'."</p>
  
  <p>I have tried:</p>
  
  <p><a href="http://localhost/odata/Users(874C0BC3-6D9B-4DFA-B42C-8403FE1B281D)/GetContacts()" rel="nofollow noreferrer">http://localhost/odata/Users(874C0BC3-6D9B-4DFA-B42C-8403FE1B281D)/GetContacts()</a></p>
  
  <p>I've removed the explicit setting of the ODataRouteAttribute and relying on the built-in routing convention but still no luck.</p>
  
  <p>I've also tried removing "Default." from the ODataRouteAttribute but this throws a server error when trying to launch the application "Found an unresolved path segment 'GetContacts()' in the OData path template 'Users({key})/GetContacts()'."</p>
  
  <p>Does anybody know what I am doing wrong?  Or is there a way you can show me to debug these types of routing issues so I can solve the problem myself?</p>
  
  <p>Appreciate any help you can give.</p>
  
  <p>p.s. I am using OData v4.</p>