• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 913
  • Last Modified:

Entity framework vs dataset

Hello
I'm just "having fun" to use ado.net entity framework. I did a little test:
to wonder about 16000 times an sql table of fifty records to extract information. Using extension "First" combined with a lambda expression processing time is about 4 times that of lead in the local store (in a dataset) and interrogate him. I also tried to compile the linq query but I saved a few seconds.
It should then, for operations like the one above, where the stock is the subject of the selection remains unchanged during processing, working again with the dataset or entity framework offers alternative but maybe I have not yet discovered?
0
fantamen
Asked:
fantamen
  • 3
  • 2
1 Solution
 
CodeCruiserCommented:
My goodness. I hope someone is able to understand that mumbling :-)
0
 
fantamenAuthor Commented:
Sorry, to optimize my work time i've translate from italian to english using google but probably with bad result. I've tried to explain better....

Hello
I'm just "having fun" to use ado.net entity framework. I did a little test:
I query for about 16000 times a table of fifty records to extract information. Using extension "First" combined with a lambda expression processing time is about 4 times than query a datatable (in a dataset) I also tried to compile the linq query but I saved a few seconds.
For similar situation is better to continue using dataset or entity framework offer other solutions?
0
 
CodeCruiserCommented:
Performance wise, especially if you are talking about loads of rows, I have found from my experience that Stored Procedures and DataTables are a better choice. To load a single record and its associated entities or to create/update a record, LINQ/EF is a better choice. So I use a mix of both in my projects.
0
 
fantamenAuthor Commented:
I load a single record and its entities. If I repeat this operation 16000 times, performance using datatable is better than linq. Do you agree with me in this situation too?
0
 
CodeCruiserCommented:
As you are doing it practically, I would have to agree with you. However, I dont see a scenario where you would be retrieve a single record 16000 times in a row.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now