I have names with accented characters in a database table. Like
I need to use EF4 to get all entries from a table with the substring whatever the accents.
Consequently, this code:
myEntities.Items.Where(i => i.Name.Contains("a"));
should provide each object whose name contains
, but also anything that contains
so on. Can this be done?
The queries should function as needed if you use an accent-insensitive collation order on the Name column.
The issue will be resolved by setting an accent-insensitive collation.
With the below query, you may modify the collation for a column in SQL Server and Azure databases.
ALTER TABLE TableName ALTER COLUMN ColumnName NVARCHAR (100) COLLATE SQL_LATIN1_GENERAL_CP1_CI_AI NOT NULL
is the compilation
is British (United States),
is 1252 code page.
is not case-sensitive,
is not sensitive to accent.