title: Generating a SQL view from EF 6.1 code first
body: <p>I just changed my application from Database first to code first! What a great improvement in deploying!. But now i have the following problem. I generated my Code-first model from my database, but after recreating the database from the generated code, my views from my database are generated like tables! </p>
  
  <p>How do I generate my views from code first? and/or map them to my entities if I need to generate them manually?</p>
  
  <p>EDIT.</p>
  
  <p>Luke McGregor's post certainly brought me close.
  Yes it generates the views now. But the migrations don't work.</p>
  
  <p>When trying to do a Update-Database statement the initial output is that there still are code changes.</p>
  
  <p>I therefore executed the Add-Migration xxx Command and fired the Update-Database command again.</p>
  
  <p>EDIT 2: </p>
  
  <p>Resolving a few differences between my Code-first code and the view's SQL code solved this issue!</p>