?
Solved

Entity framework vs dataset

Posted on 2011-04-29
5
Medium Priority
?
911 Views
Last Modified: 2012-08-14
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
Comment
Question by:fantamen
  • 3
  • 2
5 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 35491434
My goodness. I hope someone is able to understand that mumbling :-)
0
 

Author Comment

by:fantamen
ID: 35491601
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
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 35491639
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
 

Author Comment

by:fantamen
ID: 35491750
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
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 1000 total points
ID: 35491768
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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month17 days, 4 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question