I have a project with LINQ and I want to use my own method in it. This NoWhiteSpaces method should return upper string with no spaces.
public static class Li
LINQ to Entities tries to translate every called method into a part of the database query that is executed. When trying to translate your method, it fails because it doesn't know how to represent it in SQL.
You can get around it by either
String.Replace() and String.ToUpper() are supported, it should be easy to replace your custom method with it.