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
Sharepoint error, event id 6481
How do I silently Install Java?
Issues change workstation IP
groupwise to zimbra migration
Setting the "All Day Event" checkbox default to checked
Compare Column Names in Tables in Schema A With Column Names in Tables in Schema B.
Google Apps Gmail and legacy MS Exchange (SBS) 2003 Synchronisation
calculate age in mysql
Replacing Design lost all e-mails in inbox
This program cannot be run in DOS mode.