Wednesday, 21 August 2013

Linq using Distinct() in C# Lamda Expression

Linq using Distinct() in C# Lamda Expression

SFC.OrderFormModifiedMonitoringRecords
.SelectMany(q => q.TimeModify, w => w.DateModify)
.Distinct()
.OrderBy(t => t)
.SelectMany(t => new { RowID = t.rowID, OFnum = t.OFNo });
It's Error did i missed something or is it Completely Coded The Wrong Way?
After this i'm gonna use this on a Foreach method to gather up multiple
data without the duplicates.

No comments:

Post a Comment