Microsoft
Software
Hardware
Network
Question : linq
I am trying to display data froma sql server DB in silverlight3
I followed this link
http://www.codeproject.com
/KB/silver
light/
Silv
erlight3_S
QL_WCF.asp
x
and I get an error with the return list as it cant return a list.
Error 1 Value of type 'System.Collections.Generi
c.List(Of sql.Web.one)' cannot be converted to 'System.Collections.Generi
c.List(Of sql.Web.Service1.StudentIn
fo)'.
''''''''''''''''''''''''''
''''''''''
'''''
'service1.svc
<ServiceContract(Namespace
:="")> _
<AspNetCompatibilityRequir
ements(Req
uirementsM
ode:=AspNe
tCompatibi
lityRequir
ementsMode
.Allowed)>
_
Public Class Service1
<OperationContract()> _
Public Function filldata() As List(Of StudentInfo)
Dim db As New sql.Web.DataClasses1DataCo
ntext
Dim results = From p In db.ones _
Select p
Return results.ToList
End Function
Public Class StudentInfo
Public id As String
Public subject As String
End Class
End Class
''''''''''''''''''''''''''
''''''''''
''''''''''
''''''''''
'''''
'''main.xaml.vb
Private Sub but2_click(ByVal sender As System.Object, ByVal e As RoutedEventArgs)
Dim webservice3 As New sql.ServiceReference1.Serv
ice1Client
AddHandler webservice3.filldataComple
ted, AddressOf webservice_filldatacomplet
ed
webservice3.filldataAsync(
)
End Sub
Public Sub webservice_filldatacomplet
ed(ByVal sender As Object, ByVal e As ServiceReference1.filldata
CompletedE
ventArgs)
dg1.ItemsSource = e.Result
End Sub
Answer : linq
advise them that they could use Experts Exchange *laughing*).
>> GEM !!
Random Solutions
difference between AD integrated dns server and dns server
Exchange 2010 Public Folder Error
asp.net vb.net render html to component
Oracle Join null rows.
Dell PowerEdge Perc 4e/Di RAID 1 expansion
Windows 2003 WMI Errors after VMWare Virtualization
How do you use an underscore character in an AutoCad LISP script?
ClearOS Enterprise 5.2 Alpha 1
Is it possible to encrypt an email message using PHP?
How to Create Firebird Trigger to get AutoID by using Vb.net code