Awesome q2a theme

What is the value of a partial move from EntityFramework to sql queries?

0 like 0 dislike
48 views
Good day!

To optimize your asp mvc application plan in some methods of the controller to replace calls to the database using EF on treatment using sql queries. Speed up the job site?
Doubt is the fact that in some other controller actions working with dB will remain implemented using EF and Assembly will in any case be loaded.
by | 48 views

2 Answers

0 like 0 dislike
For optimization - makes sense, it will really speed up complex queries. There is no difference in the number of ways You will get data from dB in the controller. The Assembly will be loaded once, and if it is hanging around, the weather will not make it. You can make an additional layer between the Repository database and the controller and inside to make methods which will at least through EF, even through ADO.NET or more after that to get the data.
by
0 like 0 dislike
Hi! You can look at a hybrid solution EF+Dapper.
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,187 answers
0 comments
40,796 users