I developed a pretty nice web application using EF 5 and code. But during the execution of the tests, I found that the performance is not as good as I wanted ... looking further, I found out that all the requests that EF generates are similar Select * From, and this is not the best practice.
Read this answer here. Select specific columns from the database using the EF code first . I realized that I can create a view and match it with an entity. My question is how to transfer the view to an object or vice versa using EF 5 code?
The reason I ask is this: I have a very wide table, on which I do a preliminary search by name, and then return to the rest in one case ... in another I have a large table and most of the time I use only the title and description, not the LOB column ... in all cases touse Im, getting something from the database, I do not use ...
So, if I could really display a view for an entity, or vice versa, I could maintain a multi-band connection between the base and the applied degree ...
source
share