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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Dipankar BiswasPosted Jul 31, 2014, 2:45 PM
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.
Pradeep ShetPosted Jul 30, 2014, 1:18 AM
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.