locked
请问LINQ to XML和LINQ to Object是否已经淘汰了? RRS feed

  • 问题

  • 刚学LINQ,不知道LINQ to XML和LINQ to Object淘汰了吗?
    还是,直接学习LINQ to Entity,不知道LINQ to Entity是否对XML是否支持
    2011年8月29日 9:31

答案

  • LINQ to SQL、LINQ to Entity、LINQ to Object和LINQ to XML的市场定位不同。是否应该学应该询问你的公司的项目设计师或者你感兴趣的目标城市的人才市场劳工部门的市场调查。

    这些是不同的LINQ提供者,面向的是不同的应用场合。比如LINQ to SQL生成SQL Server特有的查询,LINQ To Entity生成比较通用的查询(因此不支持SQL Server特有的特性,同时也比较低效),LINQ to Object和Linq to XML不生成发送到数据库的查询,而是查询不同的数据类型。你为什么觉得这些提供者应该整合?你需要支持多种数据库同时只支持一种数据库,还是你要把数据库查询出来的结果再用LINQ to Object在内存过滤一次(提示:通常这是浪费带宽和CPU,除非你查询的是缓存)?



    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    2011年8月30日 16:37
    版主

全部回复

  • 你为什么会认为LINQ to XML和LINQ to Object被淘汰了?还有你为什么会认为LINQ to Entity需要支持XML?

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    2011年8月30日 1:36
    版主
  • 刚学LINQ,听说LINQ to SQL已经被淘汰了。

    我晕!所以,先问问清楚,再学。

    以避免,忙一场,到头来,却是被淘汰。这样,非常浪费时间。

    如果,LINQ to Entity支持XML的话,学一个LINQ to Entity就可以吗?

    不过,它们的结构不太一样。所以,好像整合起来比较的困难。

    不知道,未来LINQ如何发展啊


    2011年8月30日 11:51
  • LINQ to SQL、LINQ to Entity、LINQ to Object和LINQ to XML的市场定位不同。是否应该学应该询问你的公司的项目设计师或者你感兴趣的目标城市的人才市场劳工部门的市场调查。

    这些是不同的LINQ提供者,面向的是不同的应用场合。比如LINQ to SQL生成SQL Server特有的查询,LINQ To Entity生成比较通用的查询(因此不支持SQL Server特有的特性,同时也比较低效),LINQ to Object和Linq to XML不生成发送到数据库的查询,而是查询不同的数据类型。你为什么觉得这些提供者应该整合?你需要支持多种数据库同时只支持一种数据库,还是你要把数据库查询出来的结果再用LINQ to Object在内存过滤一次(提示:通常这是浪费带宽和CPU,除非你查询的是缓存)?



    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    2011年8月30日 16:37
    版主