background preloader

Linq to SQL

Facebook Twitter

University of Huddersfield :: Article Linker. University of Huddersfield :: Article Linker. Understanding LINQ to SQL Query Translations. I posted two blog posts last weekend about using LINQ to easily perform data access against a database. Several people have asked me for more details on LINQ to SQL since then. Sahil Malik made some excellent posts earlier this summer that go into more detail about LINQ to SQL (aka DLINQ) and how it works.

You can read his posts here: Bill Wagner has also recently made several great posts that go into more detail about how LINQ queries are translated and executed as SQL. As I talked about in this recent blog post, one of the really cool things about LINQ is that you can always hover over a LINQ query while in the debugger to drill in and see the underlying SQL query that is ultimately executed: You can then expand the debug visualizer to both see and execute the underlying SQL query while in the debugger: This provides a really cool way to see what is happening under the covers and to easily experiment and adapt your queries however you want. Hope this helps, Scott. LINQ to SQL: .NET Language-Integrated Query for Relational Data. MSDN Library Articles and Overviews .NET General LINQ: .NET Language Integrated Query LINQ to SQL: .NET Language-Integrated Query for Relational Data .NET Language-Integrated Query for XML Data The .NET Standard Query Operators Overview of C# 3.0 LINQ to SQL: .NET Language-Integrated Query for Relational Data 398 out of 514 rated this helpful - Rate this topic Dinesh Kulkarni, Luca Bolognese, Matt Warren, Anders Hejlsberg, Kit George March 2007 Applies to: Visual Studio Code Name "Orcas" .Net Framework 3.5 Summary: LINQ to SQL provides a runtime infrastructure for managing relational data as objects without losing the ability to query.

Contents Introduction Most programs written today manipulate data in one way or another and often this data is stored in a relational database. Of course, the differences go far deeper than that. It is no wonder that applications expected to bridge this gap are difficult to build and maintain. LINQ to SQL is designed to be non-intrusive to your application. Using LINQ to SQL (Part 1) Over the last few months I wrote a series of blog posts that covered some of the new language features that are coming with the Visual Studio and .NET Framework "Orcas" release. Here are pointers to the posts in my series: The above language features help make querying data a first class programming concept. We call this overall querying programming model "LINQ" - which stands for .NET Language Integrated Query.

Developers can use LINQ with any data source. They can express efficient query behavior in their programming language of choice, optionally transform/shape data query results into whatever format they want, and then easily manipulate the results. LINQ-enabled languages can provide full type-safety and compile-time checking of query expressions, and development tools can provide full intellisense, debugging, and rich refactoring support when writing LINQ code.

What Is LINQ to SQL? LINQ to SQL fully supports transactions, views, and stored procedures. LINQ to SQL Code Examples Summary. Visual Basic Developer Center.