Udostępnij za pośrednictwem


LINQ in the .NET Compact Framework

Language-Integrated Query (LINQ) adds general-purpose query facilities to the .NET Compact Framework that apply to various sources of information such as relational databases, XML data, and in-memory objects. These features enable the .NET Compact Framework to query on different sources of information without adding relational or XML-specific features to the programming language.

Note

LINQ is supported in the .NET Compact Framework version 3.5 and later.

LINQ defines a set of general-purpose standard query operators that enable you to perform language-integrated query, set, and transform operations on internal or external data. The standard query operators let you apply queries to any IEnumerable<T>-based information source.

LINQ in the .NET Compact Framework includes a subset of the desktop LINQ features. The differences between LINQ in the .NET Framework and LINQ in the .NET Compact Framework are as follows:

  • On the .NET Compact Framework, only standard query operators are supported. LINQ to DataSet is supported, which provides LINQ support for DataSet and DataTable.

  • On the .NET Compact Framework, LINQ to XML is supported except for System.Xml.XPath extensions.

  • On the .NET Compact Framework, Visual Basic query syntax for LINQ to DataSet does not support the Select Clause (Visual Basic) clause where the operator is optional. That is, if the Select clause does not include parameters that change the default result of the query, you must remove the Select clause.

For more information on LINQ, see the LINQ Project Web site on MSDN, the Microsoft Developer Network.

See Also

Other Resources

Data Access and XML Support in the .NET Compact Framework

Change History

Date

History

Reason

May 2009

Added information about support for the Select clause in Visual Basic.

Content bug fix.