I am working on mvc4 database first approach,in this i am using entity frame work.
so i need to know which one is better either ef or stored procedures?..
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Pradeep ShetRank #595 · 4K reputationPosted Jul 29, 2014, 9:18 PM EDT
See EF is an ORM which converts your database level objects into class level objects. So we get an automated mechanism of accessing and storing the data in database without much programming. So according to me for faster development and access to tables objects in a better way in application programming go for EF.
Hope this suffices your problem. If it is so mark it as answered.
Dipankar BiswasRank #992 · 2K reputationPosted Jul 31, 2014, 10:45 AM EDT
to be honest, a stored procedure with manual mapping will always be faster in performance. But ask yourself, how important is performance? In most projects, development time is way more important then performance. What was harder to develop? The raw query with parsing or the Entity Framework query?
ORMs are not designed because they perform so much betterthen a hand written approach. We use them because development is so much easier!
If you write your application with the Entity Framework and hide all your queries behind a repository pattern you can develop real quick and then, when performance becomes an issue, measure your application to detect the bottleneck. Then maybe some of your queries need optimization and can be moved to stored procedures and manual mapping.