| title | ms.custom | ms.date | ms.prod | ms.reviewer | ms.suite | ms.technology | ms.tgt_pltfrm | ms.topic | ms.assetid | caps.latest.revision | author | ms.author | manager | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
How to: Query for Information |
03/30/2017 |
.net-framework |
|
article |
e538d288-2070-40ca-9da6-4fbc68cd6ad0 |
2 |
JennieHubbard |
jhubbard |
jhubbard |
How to: Query for Information
Queries in [!INCLUDEvbtecdlinq] use the same syntax as queries in [!INCLUDEvbteclinq]. The only difference is that the objects referenced in [!INCLUDEvbtecdlinq] queries are mapped to elements in a database. For more information, see Introduction to LINQ Queries (C#).
[!INCLUDEvbtecdlinq] translates the queries you write into equivalent SQL queries and sends them to the server for processing.
Some features of [!INCLUDEvbteclinq] queries might need special attention in [!INCLUDEvbtecdlinq] applications. For more information, see Query Concepts.
Example
The following query asks for a list of customers from London. In this example, Customers is a table in the Northwind sample database.
[!code-csharpDLinqQuerying#1] [!code-vbDLinqQuerying#1]
See Also
Creating the Object Model
Downloading Sample Databases
Querying the Database