title: How can I use database Views in a scaffolded DbContext with Entity Framework Core 1.0 (EF7)
body: <p>Unfortunately <strong>Entity Framework Core 1.0</strong> (formerly Entity Framework 7) does not yet support Views, and I'm trying to 'fake' it using a table.</p>
  
  <p>However the scaffolding <code>dotnet dbcontext ef scaffold</code> command doesn't currently recognize or generate views, and I want a single DbContext which allows querying a view and updating of tables. Is there a way to do this?</p>
  
  <p>This is the command I use to scaffold the DbContext:</p>
  
  <pre><code>dotnet ef dbcontext scaffold -c MyStoreContext -o Model "Data Source=(local);Initial Catalog=DBNAME;Integrated Security=True" Microsoft.EntityFrameworkCore.SqlServer --force
  </code></pre>
  
  <p>(This puts all my model classes in a <code>Model</code> directory, and forces them to be overwritten.)</p>
  
  <p>Note: The reason I actually want to use a View is for GROUP BY logic, which isn't supported either in EF Core 1.0</p>