开发者

DataTable and DataSet should be obsolete now?

Is there any valid use case for DataSet and DataTable now that we have Entity Framework? Should DataTable/DataSet be considered obs开发者_Python百科olete?


When you know the data schema at compile time then I'd EF would be all you need. However, there are situation where you're getting data from a service and you don't know what the schema/datatypes will be ahead of time. I think DataSet/DataTable would still be useful in that kind of scenario.


I wouldn't go as far as calling them obsolete. I still use datasets when gathering data from several different datasources; xml-files, databases, etc. Then I can use LINQ to DataSet to manipulate data from the different sources.

I believe there may be other scenarios as well where datasets will be the right fit.


BulkCopy is one area where DataSets hold a clear advantage over EF.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜