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..
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.
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
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
精彩评论