title: OData support two routes which returns a single entity and a collection
body: <p>I'd like to define two routes so I can access my entities. The code example below however returns an exception whenever I try to access my swagger.json file.</p>
  
  <blockquote>
    <p>Bad Request - Error in query syntax.</p>
  </blockquote>
  
  <p>There are a total of 2 routes I need;</p>
  
  <ul>
  <li>/EventLog(MeetingId={keyMeetingId},Id={keyId}) -> Returns a single entity</li>
  <li>Search(MeetingId={keyMeetingId} -> Returns multiple records</li>
  </ul>
  
  <p>Builder;</p>
  
  <pre><code>var eventLog = builder.EntitySet&lt;EventLog&lt;object&gt;&gt;(nameof(EventLog&lt;object&gt;)).EntityType;
  eventLog.HasKey(x =&gt; new { x.MeetingId, x.Id });
  
  var eventLogSearch = eventLog.Collection
     .Action("Search")
     .ReturnsCollectionFromEntitySet&lt;EventLog&lt;object&gt;&gt;(nameof(EventLog&lt;object&gt;));
  
  eventLogSearch.Parameter&lt;string&gt;("MeetingId")
  .Required();
  </code></pre>
  
  <p>Startup:</p>
  
  <pre><code> app.UseMvc(
                  builder =&gt;
                  {
                      builder.ServiceProvider.GetRequiredService&lt;ODataOptions&gt;()
                      .UrlKeyDelimiter = Parentheses;
                      builder.Count();
                      builder.Expand()
                          .Select()
                          .OrderBy()
                          .Filter();
                      builder.MapVersionedODataRoutes("odata", "api", modelBuilder.GetEdmModels());
  
                      builder.EnableDependencyInjection();
                  });
  </code></pre>
  
  <p>I've tried several other solutions, but they result in either a 404 or the error like above. Any suggestions on how to support both routes?</p>
  
  <p>I'm using asp.net core 2.2</p>