|
Free LINQ To SQL Training In Sydney
I am running a LINQ To SQL Training day on Saturday November 8th at Microsoft Office in North Ryde. The course is FREE for anyone to attend but there are only 20 places available. So if have not yet jumped into the wonderful world of writing LINQ queries. If you are considering LINQ To SQL [...]
View T-SQL Query Generated By LINQ To SQL Using Linqpad
In my previous post I showed you three different ways to capture the T-SQL query generated by LINQ To SQL. A comment on the post reminded me that I forgot to mention a fourth way i.e. using Linqpad. In Linqpad when you have executed the query you can click on the SQL tab next to [...]
View T-SQL Query Generated By LINQ To SQL
While working with LINQ To SQL there are times when you are interested in looking at the query which will be executed on the database. This post will cover different ways you can capture the query generated by LINQ To SQL.
SQL Server Profiler
SQL Profile has long been a preferred tool to capture activity on a [...]
Use SqlConnection With LINQ To SQL
LINQ To SQL allows us to use a SqlConnection object to connect to a database. The way to use a SqlConnection is to pass it as a parameter to DataContext object. DataContext object has constructor which takes in a IDbConnection and SqlConnection implements this Interface. Here I create a SqlConnection object and use it to [...]
LINQ To SQL Join On Multiple Conditions
LINQ To SQL or just plain LINQ allows us to do a join on multiple conditions using an elegant technique. In this post I will show you how to perform a Join on multiple conditions. As an example I will take two tables called House and ShoppingMall.
Both these tables have PostCode and CouncilCode as common [...]
Channel 9 Visits One .Net Way
Channel 9 does a “This Week On Channel 9” video every week and this week they paid a visit to One .Net Way. They mentioned my post about Retrieving a list of applications using LINQ in their news video. I am very happy to see One .Net Way mentioned on Channel 9. It feels good [...]
Get A List Of Installed Applications Using LINQ And C#
To get a list of installed applications we need to look into registry. Microsoft.Win32 namespace contains objects which can be used to work with Windows Registry. In this post I will show you some code where I use the power of LINQ to retrieve and display a list of all applications installed on a machine.
The [...]
LINQ Equivalent Of Where IN
Working with LINQ to SQL I came across a need of writing a LINQ query equivalent of T-SQL “Where IN” clause. This is what T-SQL query looks like.
SELECT CustomerID, CompanyName, ContactName, ContactTitle, Address,
City, Region, PostalCode, Country, Phone, Fax
FROM [...]
Find Duplicates Using LINQ
How can we find duplicate occurrences of values in a collection? I will demonstrate this here using a collection of cities. City class looks like this:
public class City
{
public string Name { get; set; }
public string Country { get; set; }
}
Cities collection is initialised with this code:
List<City> cities [...]
Different Flavors Of LINQ
You may have noticed from my blog posts lately that these days I am spending considerable time working with LINQ. Although I mainly concentrate on LINQ To Objects and LINQ To XML, I often wander around and play with other flavors of LINQ as well. Today, just out of curiosity I wanted to see how [...]
Tutorial Reading A Text File Using LINQ
Introduction
At times us developers have to deal with delimited text files in our applications. Such files have been around since yonks and I often come across data import/export tasks where delimited files are used. Till now the common way in .NET has been to read each line and then extract data using some sort of [...]
Dynamic Sort With LINQ
In this post I will show you how to perform dynamic sorting with LINQ. I will work with a simple collection of City class. City class is defined below.
public class City
{
public string Name { get; set; }
public string Country { get; set; }
}
The collection is initialised using [...]
Get Updates By Email
Popular Post
Tag Cloud
Code Snippets
- Get Current Windows User In C#
- Get Width And Height Of Image In C#
- Get Windows Registry Size With WMI And C#
- Reverse Array Elements Using C#
- Convert Hexadecimal To Number In C#
- Get Free Disk Space Using T-SQL
- SQL Server 2008 – Get All Indexes In A Database
- Get Name Of Current Executing Assembly In C#
- Get CD Or DVD Drive Information Using WMI And C#
- Get Last Row From Table Using LINQ To SQL

