You need to create a stub method for your function . It should look like this:
[EdmFunction("YourModelNamespace", "GetUniqueInt")] public static int GetUniqueInt() { throw new NotSupportedException("Direct calls are not supported."); }
Put this method, for example, in your context class and use it in LINQ queries.
Ladislav Mrnka
source share