title: Mapping View to Entity using EF 5 Code First
body: <p>I have developed a quite nice web-app using EF 5 and code first. But while running benchmarks I found that the performance was not as good as I wanted... looking further I kinda figured out that all the queries that EF generates are similar to <code>Select * From</code> and that is not best practise.</p>
  
  <p>Reading this answer here <a href="https://stackoverflow.com/questions/11528988/select-specific-columns-from-database-using-ef-code-first">Select Specific Columns from Database using EF Code First</a> I understood that I could generate a view and map it to a entity. My question is how do I map a view to a entity or vice-versa using EF 5 code first?</p>
  
  <p>The reason I'm asking this is: I have a very wide table on which I perform "preliminar search" search items by name and then go back for the rest of it on one case... in another I have a big table and most of the time I only use the Title and Description and not the LOB column... in all thouse cases Im getting something from the database Im not using...</p>
  
  <p>So if I could indeed map a view to a entity or vice-versa I could save alot of bandwith between backbone and application tier...</p>