I generate a model from my database.
In the .edmx file I have a row string
<Function Name="GetUniqueInt" ReturnType="int" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="true" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" />
as its cause?
You need to create stub method for your function somewhere. It should look like:
Place this method for example to your context class and use it in LINQ queries.