Link to home
Start Free TrialLog in
Avatar of fantamen
fantamenFlag for Italy

asked on

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?
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

My goodness. I hope someone is able to understand that mumbling :-)
Avatar of fantamen

ASKER

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?
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.
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?
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial