LINQ to SQL tools in Visual Studio

LINQ to SQL tools in Visual Studio

LINQ to SQL was the first object-relational mapping technology released by Microsoft. It works well in basic scenarios and continues to be supported in Visual Studio, but it's no longer under active development. Use LINQ to SQL when maintaining a legacy application that's already using it, or in simple applications that use SQL Server and do not require multi-table mapping. In general, new applications should use the Entity Framework when an object-relational mapper layer is required.

Install the LINQ to SQL tools

In Visual Studio, you create LINQ to SQL classes that represent SQL tables by using the Object Relational Designer (O/R Designer). The O/R designer is the UI for editing .dbml files. Editing .dbml files with a designer surface requires the LINQ to SQL tools which are not installed by default as part of any of the workloads of Visual Studio.

To install the LINQ to SQL tools, start the Visual Studio installer, choose Modify, then select the Individual Components tab, and then select LINQ to SQL tools under the Code Tools category.

What is the O/R Designer

The O/R Designer has two distinct areas on its design surface: the entities pane on the left, and the methods pane on the right. The entities pane is the main design surface that displays the entity classes, associations, and inheritance hierarchies. The methods pane is the design surface that displays the DataContext methods that are mapped to stored procedures and functions.

The O/R Designer provides a visual design surface for creating LINQ to SQL entity classes and associations (relationships) that are based on objects in a database. In other words, the O/R Designer creates an object model in an application that maps to objects in a database. It also generates a strongly-typed DataContext that sends and receives data between the entity classes and the database. The O/R Designer also provides functionality to map stored procedures and functions to DataContext methods for returning data and populating entity classes. Finally, the O/R Designer provides the ability to design inheritance relationships between entity classes.

 

作者:Chuck Lu    GitHub    
posted @   ChuckLu  阅读(54)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
历史上的今天:
2021-11-24 创建Hyper-V虚拟机安装Win10教程详解
2020-11-24 SAP Connector for Microsoft .NET
2017-11-24 page template in kentico
2016-11-24 TextInfo
点击右上角即可分享
微信分享提示