In LINQ, you can write a manual SQL query, extract the results from it and LINQ "map" them to the corresponding properties of your model classes (or at least I'm sure I read that you can do this).
Is it possible to do something like this in the Entity Framework?
I have a web application using EF, and its use by the processor is ridiculously large compared to the traffic that it has, and profiling it on my machine, all this time (presumably) spent on DB functions, and the largest part of this time (> 85%) is spent on the SQL "generation" EF and does things until the query is actually executed.
So, my reasoning is that I can just log in and hard code the SQL queries, but still use my populated model properties in my view.
Is it possible? If so, how do I do this?
Thank!
Daniel
source
share