Hello,
I've already used User Defined Stored Procedures calls with different definitions in a partial Linq to Sql class to use procedure overloading in .net and it's working very fine.
I've tried to do the same thing with a User Define Function, no compiling errors but it execution (function age(namd) ) threads an exception "An insufficient number of arguments were supplied for the procedure or function age"
Here what I wrote in the partial class datacontext
And here is the function definition in the Linq file (.designer.vb)
Could anyone help me?
Thanks
I've already used User Defined Stored Procedures calls with different definitions in a partial Linq to Sql class to use procedure overloading in .net and it's working very fine.
I've tried to do the same thing with a User Define Function, no compiling errors but it execution (function age(namd) ) threads an exception "An insufficient number of arguments were supplied for the procedure or function age"
Here what I wrote in the partial class datacontext
VB.NET:
<FunctionAttribute(Name:="dbo.Age", IsComposable:=True)> _
Public Function Age(<Parameter(DbType:="BigInt")> ByVal nadm As System.Nullable(Of Long)) As String
Return CType(Me.ExecuteMethodCall(Me, CType(MethodInfo.GetCurrentMethod, MethodInfo), nadm).ReturnValue, String)
End Function
And here is the function definition in the Linq file (.designer.vb)
VB.NET:
<FunctionAttribute(Name:="dbo.Age", IsComposable:=true)> _
Public Function Age(<Parameter(DbType:="BigInt")> ByVal nadm As System.Nullable(Of Long),
<Parameter(Name:="TypeAge", DbType:="TinyInt")> ByVal typeAge As System.Nullable(Of Byte))
As String
Return CType(Me.ExecuteMethodCall(Me, CType(MethodInfo.GetCurrentMethod,MethodInfo), nadm, typeAge).ReturnValue,String)
End Function
Could anyone help me?
Thanks