LINQ to SQLLINQ to SQL 是.NET Framework 3.5 版提供的關聯式資料當做物件管理的執行階段基礎結構的元件。is a component of .NET Framework version 3.5 that provides a run-time infrastructure for managing relational data as objects.


關聯式資料會顯示為二維資料表 (「關聯」或「一般檔案」) 的集合,其中通用資料行會與資料表彼此相關。Relational data appears as a collection of two-dimensional tables (relations or flat files), where common columns relate tables to each other. 若要有效地使用 LINQ to SQLLINQ to SQL,您必須熟悉關聯式資料庫的基礎原則。To use LINQ to SQLLINQ to SQL effectively, you must have some familiarity with the underlying principles of relational databases.

LINQ to SQLLINQ to SQL 中,關聯式資料庫的資料模型會對應至以開發人員的程式設計語言表示的物件模型。In LINQ to SQLLINQ to SQL, the data model of a relational database is mapped to an object model expressed in the programming language of the developer. 執行應用程式時,LINQ to SQLLINQ to SQL 會將物件模型中的 Language Integrated Query (LINQ) 轉譯成 SQL,並將這些查詢傳送至資料庫進行執行。When the application runs, LINQ to SQLLINQ to SQL translates into SQL the language-integrated queries in the object model and sends them to the database for execution. 當資料庫傳回結果時,LINQ to SQLLINQ to SQL 會將結果轉譯回您可以在自己的程式語言中處理的物件。When the database returns the results, LINQ to SQLLINQ to SQL translates them back to objects that you can work with in your own programming language.

開發人員使用 Visual Studio 通常會使用Object Relational DesignerObject Relational Designer,以提供使用者介面實作的許多功能LINQ to SQLLINQ to SQLDevelopers using Visual Studio typically use the Object Relational DesignerObject Relational Designer, which provides a user interface for implementing many of the features of LINQ to SQLLINQ to SQL.

這一版 LINQ to SQLLINQ to SQL 隨附的文件會描述建置 LINQ to SQLLINQ to SQL 應用程式所需的基本建置組塊、處理序和技巧。The documentation that is included with this release of LINQ to SQLLINQ to SQL describes the basic building blocks, processes, and techniques you need for building LINQ to SQLLINQ to SQL applications. 您也可以搜尋 Microsoft Docs 特定問題,並可以參與LINQ 論壇,您可以與專家討論更複雜的主題的詳細資料。You can also search Microsoft Docs for specific issues, and you can participate in the LINQ Forum, where you can discuss more complex topics in detail with experts. 最後, LINQ to SQL: 關聯式資料的.net language-integrated Query白皮書詳細說明LINQ to SQLLINQ to SQL技術,其中包含 Visual Basic 和 C# 程式碼範例。Finally, the LINQ to SQL: .NET Language-Integrated Query for Relational Data white paper details LINQ to SQLLINQ to SQL technology, complete with Visual Basic and C# code examples.

本節內容In This Section

快速入門Getting Started
提供 LINQ to SQLLINQ to SQL 的扼要概觀,以及如何著手使用 LINQ to SQLLINQ to SQL 的相關資訊。Provides a condensed overview of LINQ to SQLLINQ to SQL along with information about how to get started using LINQ to SQLLINQ to SQL.

程式設計手冊Programming Guide
提供對應、查詢、更新、偵錯和類似工作的步驟。Provides steps for mapping, querying, updating, debugging, and similar tasks.

提供 LINQ to SQLLINQ to SQL 某些層面的參考資訊。Provides reference information about several aspects of LINQ to SQLLINQ to SQL. 主題包含 SQL-CLR 型別對應、標準查詢運算子轉譯等等。Topics include SQL-CLR Type Mapping, Standard Query Operator Translation, and more.

提供 Visual Basic 和 C# 範例的連結。Provides links to Visual Basic and C# samples.

Language Integrated Query (LINQ)C#\Language-Integrated Query (LINQ) - C#\ 提供中的 LINQ 技術的概觀, C#。Provides overviews of LINQ technologies in C#.

Language-Integrated Query (LINQ) - Visual BasicLanguage-Integrated Query (LINQ) - Visual Basic
提供在 Visual Basic 中的 LINQ 技術的概觀。Provides overviews of LINQ technologies in Visual Basic.

描述LINQLINQVisual Basic 使用者的技術。Describes LINQLINQ technologies for Visual Basic users.

ADO.NET 入口網站的連結。Links to the ADO.NET portal.

LINQ to SQL 逐步解說LINQ to SQL Walkthroughs
列出 LINQ to SQLLINQ to SQL 可用的逐步解說。Lists walkthroughs available for LINQ to SQLLINQ to SQL.

下載範例資料庫Downloading Sample Databases
描述如何下載文件中所用的範例程式庫。Describes how to download sample databases used in the documentation.

LinqDataSource Web 伺服器控制項概觀LinqDataSource Web Server Control Overview
描述如何LinqDataSource控制項會公開Language-Integrated Query (LINQ)Language-Integrated Query (LINQ)透過 ASP.NET 資料來源控制項架構的 Web 開發人員。Describes how the LinqDataSource control exposes Language-Integrated Query (LINQ)Language-Integrated Query (LINQ) to Web developers through the ASP.NET data-source control architecture.