LINQ to SQLLINQ to SQL

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 的開發人員通常會使用物件關聯式設計工具,它會提供用來執行許多功能的使用者介面 LINQ to SQLLINQ to SQLDevelopers using Visual Studio typically use the Object 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 語言整合式查詢白皮書詳細說明 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.

參考Reference
提供 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.

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

語言整合式查詢(LINQ)-C#Language-Integrated Query (LINQ) - C#
概述 c # 中的 LINQ 技術。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.

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

LINQ 和 ADO.NETLINQ and ADO.NET
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 透過 ASP.NET 資料原始檔控制架構,將語言整合式查詢(LINQ)公開給 Web 開發人員。Describes how the LinqDataSource control exposes Language-Integrated Query (LINQ) to Web developers through the ASP.NET data-source control architecture.