这可能是一个被公开的问题,但我的项目有问题。书籍'名称包括多字节字符串,如Ç
,Ğ
,İ
,Ş
,Ö
,Ü
。如果我使用它们而不进行这样的培养:
private readonly LinqtoSQLiteDataContext _connection = new LinqtoSQLiteDataContext();
var books = _connection.books.OrderBy(f => f.name);
GridControlBooks.DataSource = books;
输出如下:
但是,İnternet Ortamında Kişilik Haklarının İhlâli...
必须位于Günümüz Türkçe'siyle Mecelle
之后。我试过这个:
private readonly LinqtoSQLiteDataContext _connection = new LinqtoSQLiteDataContext();
var culture = new CultureInfo("tr-TR");
var books = _connection.books.OrderBy(f => f.name, StringComparer.Create(culture, false));
GridControlBooks.DataSource = books;
但它会返回如下错误:
An unhandled exception of type 'System.NotSupportedException' occurred in Devart.Data.Linq.dll
Additional information: Unsupported overload used for query operator 'OrderBy'.
我该如何解决问题?