Tag Archives: LINQ

Sort Generic List Using Lambda Expression For Dynamic Type And Dynamic Property

By | September 17, 2011

Once stuck on a requirement where I needed to write a code which is flexible and generic enough to sort any type of collection and also the property based on which it has to be sorted will be dynamic. After trying many options I discovered myself how easy it is to hit this requirement using Lamda Expression.

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 »