When using a Linq statement "Where(x=>x.Name.Trim().ToLowerInvariant()==name)" against MsSqlCe40Dialect, it gets translated into incorrect sql statement. Register the trim function in MsSqlCe40Dialect with the following fix the problem: RegisterFunction("trim", (ISQLFunction)new AnsiTrimEmulationFunction())
When using a Linq statement "Where(x=>x.Name.Trim().ToLowerInvariant()==name)" against MsSqlCe40Dialect, it gets translated into incorrect sql statement.
Register the trim function in MsSqlCe40Dialect with the following fix the problem: RegisterFunction("trim", (ISQLFunction)new AnsiTrimEmulationFunction())