Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't set a Return Type for Data Function
Message
From
19/08/2010 12:46:06
 
 
To
All
General information
Forum:
ASP.NET
Category:
LINQ
Title:
Can't set a Return Type for Data Function
Miscellaneous
Thread ID:
01477341
Message ID:
01477341
Views:
100
Hi,
I have a view and Stored procedure
From server explorer I drop the view to the Linq, and dtop stored procedure.
I select a stored procedure in properties window and there Return Type is ReadOnly,
I check a designer code and there is written
	<FunctionAttribute(Name:="dbo.sp_search_int_stamm_access")>  _
	Public Function sp_search_int_stamm_access(<Parameter(DbType:="NVarChar(100)")> ByVal tcAccess As String) As Integer
		Dim result As IExecuteResult = Me.ExecuteMethodCall(Me, CType(MethodInfo.GetCurrentMethod,MethodInfo), tcAccess)
		Return CType(result.ReturnValue,Integer)
	End Function
When I check my another Linq objects with stored procedures - I have another code
	<FunctionAttribute(Name:="dbo.sp_bestbuysearch_inmanufacturergroup")>  _
	Public Function sp_bestbuysearch_inmanufacturergroup(<Parameter(DbType:="Int")> ByVal tnmanufacturerid As System.Nullable(Of Integer), <Parameter(DbType:="Char(100)")> ByVal tcsearchstring As String) As ISingleResult(Of view_vbestbuysearch1)
		Dim result As IExecuteResult = Me.ExecuteMethodCall(Me, CType(MethodInfo.GetCurrentMethod,MethodInfo), tnmanufacturerid, tcsearchstring)
		Return CType(result.ReturnValue,ISingleResult(Of view_vbestbuysearch1))
	End Function
In second case its Return CType(result.ReturnValue,ISingleResult(Of view_vbestbuysearch1))
In first - Integer.

I compare stored procedures and found no diffrence. Why in one case designer file generates an INTEGER return value and in another case ISingleResult ?

Thanks
Denis
Next
Reply
Map
View

Click here to load this message in the networking platform