This section provides Visual Basic and C# examples of typical LINQ to SQL queries. Developers using Visual Studio can find many more examples in a sample solution available in the Samples section. For more information, see Samples.
db is often used in code examples in LINQ to SQL documentation. db is assumed to be an instance of a Northwind class, which inherits from DataContext.
In This Section
Determine if Any or All Elements in a Sequence Satisfy a Condition
Provides examples of using All and Any.
Formulate Joins and Cross-Product Queries
Provides examples of using foreign-key navigation in the
Provides examples of combining
select with other features (for example, anonymous types) to form query projections.
Standard Query Operators Overview (C#)
Explains the concept of standard query operators using C#.
Standard Query Operators Overview (Visual Basic)
Explains the concept of standard query operators using Visual Basic.
Explains how LINQ to SQL uses concepts that apply to queries.
Provides a portal to topics that explain programming concepts related to LINQ to SQL.