linq-to-sql Getting started with linq-to-sql

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Remarks

This section provides an overview of what linq-to-sql is, and why a developer might want to use it.

It should also mention any large subjects within linq-to-sql, and link out to the related topics. Since the Documentation for linq-to-sql is new, you may need to create initial versions of those related topics.

Installation or Setup

Installing linq-to-sql:

Right-click the App_Code folder and then click Add New Item. The Add New Item dialog box is displayed. Under Visual Studio installed templates, select the LINQ to SQL Classes template and rename the file Tasks.dbml. Click Add.

OR:

Under VS2102, in your solution explorer, right click on your project, and select "Add/New Element". Then you find : C# -> Data -> "Linq to Sql classes" (depending on your Visual studio version) or you can select "Entity Data Model". An assistant should appear to guide you through the rest of the process.

In your project classes you should then use your dataModel, and use Linq to make your requests.



Got any linq-to-sql Question?