谁知道什么是LINQ?

[已解决] 谁知道什么是LINQ?

10
[软件及编程 > C# > LINQ]
什么是LINQ?
提问时间:2010/6/19 22:14:16 | 提问者:GaLiJiKuai | 悬赏:10 | 浏览:191
最佳答案
Language-Integrated Query (LINQ) is a groundbreaking innovation in Visual Studio 2008 and the .NET Framework version 3.5 that bridges the gap between the world of objects and the world of data.

Traditionally, queries against data are expressed as simple strings without type checking at compile time or IntelliSense support. Furthermore, you have to learn a different query language for each type of data source: SQL databases, XML documents, various Web services, and so on. LINQ makes a query a first-class language construct in C# and Visual Basic. You write queries against strongly typed collections of objects by using language keywords and familiar operators. The following illustration shows a partially-completed LINQ query against a SQL Server database in C# with full type checking and IntelliSense support.

译文:

语言集成查询(LINQ)是一个颠覆性的创新, 它随着VS2008和.net framework 3.5 一起发布. 它填平了对象世界与数据世界之间的鸿沟.

传统上, 查询数据的语句是一些简单的字符串, 它没有编译时的类型检查或智能感知的支持, 并且, 你每换一种数据源, 你就得学习一种新的查询语言: SQL 数据库, XML 文档, 各种各样的web 服务, 等等.  LINQ 是最优秀的查询语言, 它内嵌于C# 和VB.  当你编写查询语句时, 你可以使用熟悉的关键字和操作符在强类型的对象集合上编写查询, 下面的示例展示了一个不完整的在SQL Server 数据库上的LINQ 查询, 用C# 语法 , 它拥有完全的类型检查和智能感知支持.
回答时间:2010/7/14 13:45:43 | 回答者:zsu
其他参考答案(0)
提交失败!请检查错误!错误信息:

注:以上所有信息由网友提供,仅供交流、参考,均不代表盛派网络言论,如果有任何问题或不妥,请立即联系我们

以下信息或许对您有用: