LINQ to SQL allows .NET developers to write “queries” in their .NET language of choice to retrieve and manipulate data from a SQL Server database. In a general sense, LINQ to SQL allows us to create SQL queries in our preferred .NET language syntax and work with a strongly types collection of objects as a return result. We can make changes to these objects then save changes back to the database.
Features at a glance:
- New API for accessing and working with SQL Server databases
- Query language over database (eg. Write in C#, functional SQL query generated )
- Creates strongly typed object wrappers for database objects, including foreign-key hierarchy if they exist. Provides syntax checking and intellisense support in VS.NET
- Object changes persisted back to the database (dynamic SQL or Stored Procedures)
- Create databases and tables from objects in code
- Built-in diagnostics
This technology was codenamed DLINQ when it was initially made public.Edit
More Information / Related PagesLINQ to SQL - 5 Minute Overview
- Gives you an overview of the LINQ to SQL features through many samples.
- The code generator that reverse engineers a given database and build the required entity types and Data Context layer.
Stored Procedure Optional Parameters using LINQ to SQL
- How to alter the generated method signature in LINQ to SQL to drop optional parameters and allows the default supplied in T-SQL to be used.Batch Updates and Deletes for LINQ to SQL
- Terry Aney
has posted his solution in the form of a few very cool extension methods that support batch deletes and updates. See the article here.Edit