Reputation: 59
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?
Upvotes: 0
Views: 1108
Reputation: 364409
You need to create stub method for your function somewhere. It should look like:
[EdmFunction("YourModelNamespace", "GetUniqueInt")]
public static int GetUniqueInt()
{
throw new NotSupportedException("Direct calls are not supported.");
}
Place this method for example to your context class and use it in LINQ queries.
Upvotes: 2