title: How to use database views in EF Core 3.0?
body: <p>I know the question was asked before, but at the time it was, we had EF Core 2.x. The short answer was "no you can't" and obviously, not very helpful.</p>
  
  <p>The other answers involved ugly hacks like changing migration files after they were created by the tool.</p>
  
  <p>I make an application Code First. I have my models created with lot's of foreign keys and database joins in mind.</p>
  
  <p>But here comes the unpleasant surprise (I'm a little new to EF): those joins written in LINQ are pretty slow, as a matter of fact they do not produce database join, but fetch whole tables instead.</p>
  
  <p>Of course it's totally unacceptable, I import an old database with millions of records, with the joins I get results in milliseconds, without I get couple of seconds lags - on my very fast internet connection (in real world scenario it would be much worse).</p>
  
  <p>I need views, and AFAIK EF won't create them for me, is it STILL true for EF 3.0?</p>
  
  <p>Then, what would be the best and the most clean way to create views in SQL and to make entities for them? I mean - considering the situation the database models would change over time, and the database structure would have to be updated.</p>
  
  <p>Well, I would prefer doing my joins not in SQL views, just have queries returned "JOIN" statement results. Especially some not obvious joins. Lets say table B has a column being a foreign key referencing table A. I want to get results from table A joining B for details. With normal SQL JOIN performance.</p>
  
  <p>I checked the database: there is no significant performance difference between "select * from A" and "select * from A join B...". In LINQ - the difference is huge.</p>