Answer the question
In order to leave comments, you need to log in
Is there any benefit in partially migrating from EntityFramework to sql queries?
Good afternoon!
To optimize the asp mvc application, in some controller methods I plan to replace calls to the database through EF with calls through sql queries. Will it speed up the site?
It is doubtful that in some other controller actions, work with the database will remain implemented through EF and the assembly will be loaded anyway.
Answer the question
In order to leave comments, you need to log in
For optimization - makes sense, it will really speed up complex queries. There is no difference in how many ways you will get data from the database in the controller. The assembly will load once, and if it hangs idle, the weather will not do it. You can make an additional layer of the Repository between the database and the controller and create methods inside that will be at least through EF, at least through ADO.NET, or through something else to get data.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question