Reputation: 1085
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
Reputation: 101
If you think about performance then take a look at this comparison
Upvotes: 0
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
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