Code: Select all
public class CaseInsensitiveComparer : IComparer<string>
{
public int Compare(string x, string y)
{
return string.Compare(x, y, StringComparison.OrdinalIgnoreCase);
}
}
Code: Select all
var q1 = (from b in a.Words
from c in b.Sources
from d in c.Pairs
select new { word = b.Word, source = c.Source, target = d.Target.Target })
.OrderBy(x => x.word, new CaseInsensitiveComparer());
foreach (var z in q1)
Code: Select all
System.NotSupportedException was unhandled
HResult=-2146233067
Message=Unsupported overload used for query operator 'OrderBy'.
Source=Devart.Data.Linq
...