0

I have a question. I have used ADO and Entity Framework. No doubt, Entity Framework facilitates us for writing queries in c# so we can also debug these queries. Till now what I have heard is that query processing is more fast if we execute them in SQL. So I just want to know that processing queries in c# could be slower than processing them in SQL? What I want to say is that query written in Entity framework would be slow/fast than query written in SQL?

I hope I am clear.

Please suggest.

Deepak Kumar
  • 672
  • 4
  • 15
  • 31
  • Check out some performance numbers about raw SQL vs. Entity Framework on the [Dapper-dot-net](http://code.google.com/p/dapper-dot-net/) page. – marc_s Feb 14 '12 at 06:10
  • possible duplicate of [Entity Framework VS LINQ to SQL VS ADO.NET with stored procedures?](http://stackoverflow.com/questions/2698151/entity-framework-vs-linq-to-sql-vs-ado-net-with-stored-procedures) – Jacob Feb 14 '12 at 23:49

2 Answers2

4

SQL will be faster but by how much depends on your queries. So there is no definite answer as you will have to test the results for yourself.

In my experience the performance of the entity framework is generally acceptable. If 95% of your queries are fast enough in EF then you can always write the remaining slow 5% in SQL.

row1
  • 5,568
  • 3
  • 46
  • 72
1

There are similar thread here: Entity Framework VS LINQ to SQL VS ADO.NET with stored procedures?

I this thread will help you make decision what are good/bad of both.

Community
  • 1
  • 1
Pongsathon.keng
  • 1,417
  • 11
  • 14