0

I passed the hello world phase in the Silverlight world but I found out that ADO.NET is not part of the party. :_(

I'd like to know what is the easiest method to retrieve tables\rows\single value from SQL Server. (At the moment I have a very small DB, so simplicity is more important than complicated smart solutions that can handle large amount of data.)

I what to be able to send a query like:

SELECT * FROM a JOIN b....

I found this article which I'm learning at the moment, yet I'd like to know if there are other ways to access the DB.

Thanks Asaf

2 Answers 2

1

Other way is to use WCF RIA service.
You can't access a database directly from a Silverlight application.
The only way is to use some service.

Here you can learn how to do that with RIA service.

Sign up to request clarification or add additional context in comments.

Comments

0

As suggested above, use WCF. This means setting up a WCF service on the webserve which does all the SQL magic. You may want to look at LINQ2SQL (obsolete) or Enterprise Framework for accessing database in this service. In Silverlight you just connect to the WCF service and it will be like magic, especially if you use LINQ.

Remember that you must access the same server your Silverlight app was downloaded from. If not there are special rules that apply.

For binding the data and interface Silverlight (and WPF) supports the MVVM model. This model really simplifies GUI implementation and makes it very easy to maintain the code.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.