-1

You can create EF 6 based on two approaches, create the model in designer or you do the coding part.

My question is:
Which of them has hig performance and it takes less resources when you have a database with 25 tables and 60 stored procedure?

Information:
*http://msdn.microsoft.com/en-us/data/jj590134
*Need to have a CRUD in the webapplication.
*There was a test about performance issue among opm entity framework. Nhibernate came in the first place.

enter image description here

What'sUP
  • 12,102
  • 23
  • 71
  • 120
  • ngen the EF6 DLL to improve performance: http://msdn.microsoft.com/en-us/data/dn582034 – magicandre1981 Aug 17 '14 at 06:23
  • EF is slow in any non-trivial case, and in some trivial cases too if used without thought. It doesn't belong in any place where performance is a key requirement. – Cory Nelson Aug 17 '14 at 07:38

2 Answers2

1

Performance is a product of your design. If your data model is simple enough then either approach will yield the same database. Personally I prefer db first so I can optimise it locally without coding.

ORM tools, as mentioned already, are not performant technologies. They are developer tools which throw away some outright speed at runtime for time savings during development and maintenance. So your decision to use EF, you've already compromised a bit of speed so I'd be inclined to say the choice is whatever you are more comfortable with.

If you know how to put together a database in SQL, go for that. If you're more confident in code, do it that way.

kidshaw
  • 3,189
  • 2
  • 13
  • 25
0

Which approach to use has no effect on performance.

If you are really worried about performance, then don't use EF at all. User direct SQL instead. This would allow you to fine-tune queries and indexes for biggest performance gain.

Euphoric
  • 12,015
  • 1
  • 26
  • 41