Does LinqConnect support custom comparer for OrderBy?
Posted: Tue 18 Aug 2015 15:45
I use LinqConnect Express Edition 4.5.802.0. For comparer:
and query:
exception is thrown in foreach:
Without "new CaseInsensitiveComparer()" in OrderBy, everything works.
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
...