Shivi
Shivi

Reputation: 1085

Best way to Querying TypedDataSet

I have to done optimization of my code. I am using typedDataset. For querying type dataset what is the best method.

Like: Linq or any thing else..

Upvotes: 0

Views: 291

Answers (3)

VonDequen
VonDequen

Reputation: 101

If you think about performance then take a look at this comparison

http://www.devtoolshed.com/content/performance-benchmarks-linq-vs-sqldatareader-dataset-linq-compiled-queries-part-2

Upvotes: 0

VMAtm
VMAtm

Reputation: 28355

It depends on what entity you want get at the end of the query. If you want to get some on-fly created types, then use the Linq queries. If you just want to have a code analog for sql-statements, use methods of the Dataset, DataTable and so on.

Upvotes: 1

k3b
k3b

Reputation: 14755

what do you define as best?

if you mean best=flexible i would use dataviews on datatables where you can set filter (similar to sql-where) and sorting (similar to sql-order-by). These values are simple strings that can be stored in setting-files.

however if performance is an issue for you then the database should do the filter/sort stuff for you that is independent of datasets

Upvotes: 0

Related Questions