LINQ to SQL does not support the following String methods.
Unsupported System.String Methods in General
Unsupported String methods in general:
Culture-aware overloads (methods that take a
Methods that take or produce a
Unsupported System.String Static Methods
Unsupported System.String Non-static Methods
|Unsupported System.String Non-static Methods|
Differences from .NET
Queries do not account for SQL Server collations that might be in effect on the server, and therefore will provide culture-sensitive, case-insensitive comparisons by default. This behavior differs from the default, case-sensitive semantics of the .NET Framework.
LastIndexOfreturns 0, either the string is
NULLor the found position is 0.
Unexpected results might be returned from concatenation or other operations on fixed-length strings (
NCHAR), because these types automatically have padding applied in the database.
Because many methods, such as
ToUpper, and the character indexer, have no valid translation for
NTEXTcolumns and XML,
SqlExceptionsoccur if translated normally. This behavior is considered acceptable for these types. However, all string operations must match common language runtime (CLR) semantics for