LINQ

Facebook Twitter

Creating IN Queries With Linq To Sql. Props on this one go to Scott Hanselman who pulled me back from the edge of the cliff last night.

Creating IN Queries With Linq To Sql

I was particularly distraught in getting a MIX demo together where I had to do some queries using LINQ, and I couldn't for the life of me figure out how to fashion an IN query! With Scott's help (and patience) I figured it out, and thought I should blog for my own reference, at least. 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.

Using LINQ to SQL (Part 1)

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. LINQ to SQL (Part 2 - Defining our Data Model Classes) In Part 1 of my LINQ to SQL blog post series I discussed "What is LINQ to SQL" and provided a basic overview of some of the data scenarios it enables.

LINQ to SQL (Part 2 - Defining our Data Model Classes)

In my first post I provided code samples that demonstrated how to perform common data scenarios using LINQ to SQL including: How to query a database How to update rows in a database How to insert and relate multiple rows in a database How to delete rows in a database How to call a stored procedure How to retrieve data with server-side paging I performed all of these data scenarios using a LINQ to SQL class model that looked like the one below: In this second blog post in the series I'm going to go into more detail on how to create the above LINQ to SQL data model. LINQ to SQL (Part 3 - Querying our Database) Last month I started a blog post series covering LINQ to SQL.

LINQ to SQL (Part 3 - Querying our Database)

LINQ to SQL is a built-in O/RM (object relational mapping) framework that ships in the .NET Framework 3.5 release, and which enables you to easily model relational databases using .NET classes. You can then use LINQ expressions to query the database with them, as well as update/insert/delete data from it. LINQ to SQL (Part 4 - Updating our Database) Over the last few weeks I've been writing a series of blog posts that cover LINQ to SQL.

LINQ to SQL (Part 4 - Updating our Database)

LINQ to SQL is a built-in O/RM (object relational mapper) that ships in the .NET Framework 3.5 release, and which enables you to easily model relational databases using .NET classes. You can use LINQ expressions to query the database with them, as well as update/insert/delete data. Below are the first three parts of my LINQ to SQL series: LINQ to SQL (Part 5 - Binding UI using the ASP:LinqDataSource Control) Over the last few weeks I've been writing a series of blog posts that cover LINQ to SQL.

LINQ to SQL (Part 5 - Binding UI using the ASP:LinqDataSource Control)

LINQ to SQL is a built-in O/RM (object relational mapper) that ships in the .NET Framework 3.5 release, and which enables you to easily model relational databases using .NET classes. You can use LINQ expressions to query the database with them, as well as update/insert/delete data. Below are the first four parts of my LINQ to SQL series: In these previous LINQ to SQL blog posts I focused on how you can programmatically use LINQ to SQL to easily query and update data within a database. LINQ to SQL (Part 6 - Retrieving Data Using Stored Procedures) Over the last few weeks I've been writing a series of blog posts that cover LINQ to SQL.

LINQ to SQL (Part 6 - Retrieving Data Using Stored Procedures)

LINQ to SQL is a built-in O/RM (object relational mapper) that ships in the .NET Framework 3.5 release, and which enables you to model relational databases using .NET classes. You can use LINQ expressions to query the database with them, as well as update/insert/delete data. LINQ to SQL (Part 7 - Updating our Database using Stored Procedures) Over the last few weeks I've been writing a series of blog posts that cover LINQ to SQL.

LINQ to SQL (Part 7 - Updating our Database using Stored Procedures)

LINQ to SQL is a built-in O/RM (object relational mapper) that ships in the .NET Framework 3.5 release, and which enables you to model relational databases using .NET classes. You can use LINQ expressions to query the database with them, as well as update/insert/delete data. Below are the first six parts in this series: LINQ to SQL (Part 8 - Executing Custom SQL Expressions) Over the last few weeks I've been writing a series of blog posts that cover LINQ to SQL.

LINQ to SQL (Part 8 - Executing Custom SQL Expressions)

LINQ to SQL is a built-in O/RM (object relational mapper) that ships in the .NET Framework 3.5 release, and which enables you to model relational databases using .NET classes. You can use LINQ expressions to query the database with them, as well as update/insert/delete data. LINQ to SQL (Part 9 - Using a Custom LINQ Expression with the <asp:LinqDatasource> control) Over the last few weeks I've been writing a series of blog posts that cover LINQ to SQL.

LINQ to SQL (Part 9 - Using a Custom LINQ Expression with the <asp:LinqDatasource> control)

LINQ to SQL is a built-in O/RM (object relational mapper) that ships in the .NET Framework 3.5 release, and which enables you to model relational databases using .NET classes. You can use LINQ expressions to query the database with them, as well as update/insert/delete data.