title: How can I expose Querable API using OData for EF Core Keyless Entity(Database view)?
body: <p>I am using <a href="https://www.nuget.org/packages/Microsoft.AspNetCore.OData/7.3.0" rel="nofollow noreferrer">https://www.nuget.org/packages/Microsoft.AspNetCore.OData/7.3.0</a> to expose OData 4 based Querable API using ASP.NET Core 3.1 API</p>
  
  <p>I have EF Data context with keyless entity(Database view), When I try to expose it with OData Convention based model</p>
  
  <pre><code>   modelBuilder
     .Entity&lt;Student&gt;(eb =&gt;
      {
          eb.HasNoKey();
          eb.ToView("vw_students", "public");
      });
  </code></pre>
  
  <p>And here is my OData EDM Model mapping with EF Core entity type</p>
  
  <pre><code>var edmBuilder = new ODataConventionModelBuilder();
  edmBuilder.EntitySet&lt;Student&gt;("Students");       
  return edmBuilder.GetEdmModel();
  </code></pre>
  
  <p><em>I get an error on this line edmBuilder.GetEdmModel() The entity set 'Students' is based on type 'ODataCore31.Student' that has no keys defined.</em></p>
  
  <p>My questions-
  1) Are Keyless entity types are natively supported by OData model?
  2) Is there any workaround?</p>