Tag Archives: Linq to SQL

Ordering data in LINQ Queries by more than one column

By | June 13, 2011

In this post I am going to show how to do ordering when you require to order data by using the multiple columns. By using .Orderby(x=>x.Columnname) in the LINQ query we can easily order data of the source collection. So most of new developer make use of the same function two time .Orderby(x=>x.Columnname).Orderby(x=>x.Columnname) and thinks that will do… Read More »

Difference between two Entity Set using LINQ

By | March 29, 2011

In this tips I have discussed about how to get the difference between two table/ entity sets. As for example we want to get rows form table_A which are not exists in table_B. (When table_A primarykey is part of table_B foreignkey). Following is way to get the row(s) form table_A which are not part of table_B In Linq… Read More »

Find duplicate with Linq

By | March 5, 2011

This small tips discussed about how to get list of duplicate items for the collection that we do in sql. For example I have to get list of the email id which is get entered in user table more than one time. Linq query work same as on the set of collection and which make use of count… Read More »