Linq union usage?

EDIT Def. from MSDN Enumerable.Concat – Concatenates two sequences. Enumerable.Union – Produces the set union of two sequences by using the default equality comparer. My post : Concat() vs Union() IEnumerable<TblSayacOkumalari> sayac_okumalari = entity.TblSayacOkumalari .Select(x => new { date= x.date, TotalUsageValue = x.total_usage_T1, UsageType = “T1” }) .Concat(entity.TblSayacOkumalari .Select(x => new { date= x.date, TotalUsageValue … Read more

SQL to LINQ with multiple join, count and left join

For translating SQL to LINQ query comprehension: Translate subselects as separately declared variables unless they reference columns outside the subselect, in which case use parentheses to create a sub-query. Translate each clause in LINQ clause order, translating monadic and aggregate operators (DISTINCT, TOP, MIN, MAX etc) into functions applied to the whole LINQ query. Use … Read more