<DateTimeVerification(DateTimeVerificationState.Verified)> _
<[FunctionAttribute](Name:="dbo.TestSqlFunction", IsComposable:=True)> _
Friend Function TestSqlFunction_Linq(
<Parameter(Name:="strText", DbType:="varchar")>ByVal pstrText As String) As String
Dim result As IExecuteResult = Me.ExecuteMethodCall(Me, CType(MethodInfo.GetCurrentMethod, MethodInfo),
pstrText)
Return CType(result.ReturnValue, String)
End Function
To answer my onw question: Instead of using the <[function]>
attribute you need to use the <[FunctionAttribute]>
attribute. And also add the IsComposable:=True
part makes all the difference.