Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't set a Return Type for Data Function
Message
De
19/08/2010 12:46:06
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
LINQ
Titre:
Can't set a Return Type for Data Function
Divers
Thread ID:
01477341
Message ID:
01477341
Vues:
101
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform