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
SQLCommandBuilder - GetUpdateCommand, GetInsertCommand and GetDeleteCommand Questions
Email is being received but cannot send out
Run the first php script in background - When done - run the next script ...
Count number of occurances in a string
Proliant ML110 G4 Lost RAID and Randomly gives Error 0251
Configuring MSDTC on Windows 2008 clusterQuestion:
Windows 2k8 R2 Remote Desktop Services keeps disconnecting users
class sessions vars
Shell script to queue commands
RHEL command to see how much ram and hard drive in the box