How to use SelectMany with LINQ JOINS

By | March 9, 2011

  SelectMany is Projects each element of a sequence to an IEnumerable and flattens the resulting sequences into one sequence.In this post I am going to show how you can use SelectMany Extension method to achieve the join between related tables easily without writing long queries. To understand this consider example below As shown in above image customer… Read More »

How to test a class member that is not public using Visual Studio 2010 ?

By | March 7, 2011

There are various ways to test a Class member which is not public By making the private members public of a class under test Breaks the encapsulation principle API is modified just for the sake of testing By making the private members internal of a class under test and annotate the assembly with internalsVisibleTo attribute and you can… 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 »