Skip to main content
Home Forums Silverlight Programming Silverlight Controls and Silverlight Toolkit accessing dataset from webservice method
7 replies. Latest Post by murtaza.dharwala on February 14, 2009.
(0)
aditi123456
Member
2 points
25 Posts
02-11-2009 4:51 PM |
Hi,
I am trying to return a dataset from the webservice, but it shows an error arrayofXElement not found.
What could be the reason?Is it possible to return a dataset from a webservice?
If not, could you tel me the work around for this?
Thank you.
ccoombs
Contributor
5168 points
758 Posts
02-11-2009 4:53 PM |
you can't use datasets in silverlight. or datatables, or datarows...
you need to return a list of custom business objects.
02-12-2009 10:36 AM |
hi,
could you point me to a sample?
02-12-2009 11:12 AM |
its no different than a normal webmethod. instead of returning a dataset, you'd return a list of YourObject.
this video is extremely helpful:
http://silverlight.net/learn/learnvideo.aspx?video=47177
HarshBar...
Star
9908 points
1,719 Posts
02-12-2009 11:31 PM |
You can use Linq to Xml Classes and can return List of Objects instead of returning dataset..
murtaza....
Participant
1659 points
378 Posts
02-13-2009 12:42 AM |
i would suggest to use Enitity Model instead of datasets to work with Silverlight application which connects to the database.
Entity Model is easy to create and query using Linq to object.
you can create WCF service for silverlight and in those service return the Entities not the datasets.
dataset , datatable are not available in sivlerlight
02-13-2009 12:58 PM |
If I use wcf service its giving a crossdomainpolicy error although I added the required files...
02-14-2009 12:21 AM |
i Had a similar thing when I was new to SL.
The mistake i was doing was that SL application was set as the startup project
I guess you try and set the website as startup project