RIA SERVICES
-
Friday, April 27, 2012 6:39 AM
Hi
I am new in silverlight i am using silverlight with RIA Services.
In DomainService class i created method named GetUserByID(int UserID) it's returning User class object.
i want to know on which metho i have to set the Invoke or Query.
What is the difference in Invoke and Query.
Also i have seen when at acess time to method i have to sent the compleate Method refrence but some time not need for that. i want to know what is the reason behind that.
Thanks
Arun Tyagi
All Replies
-
Friday, April 27, 2012 11:09 AM
The following link will help you:
http://msdn.microsoft.com/en-us/library/ee707373(v=vs.91).aspx
-
Monday, April 30, 2012 3:57 AM
Hi Arun,
Since you are returning a single User entity, Query suits this situation.
Invoke is only used when Query, update, delete or insert cannot be used. Especially when return an non-entity data.
Best Regards,
-
Monday, April 30, 2012 9:33 AM
Hi,
Thanks for reply..
yes i am satisfied with you but in my service i am using
<Invoke()> _
Public Function User_Authenticate(ByVal userId As String, ByVal password As String) As LoginStatus
Dim loginStatus As New LoginStatus
Try
loginStatus.UserName = userId
If Not Membership.ValidateUser(userId, password) Then
If Membership.FindUsersByName(userId).Count > 0 Then
End If
End If
Catch ex As Exception
End Try
Return loginStatus
End Functionit's not working given error-:
Operation named 'User_Authenticate' does not conform to the required signature. Return types must be an entity, collection of entities, or one of the predefined serializable types.
But in other servies code it's working i want to know about that.
Thanks
Arun Tyagi

