Silverlight and MySQL

Hello All,


I would like to share a new aspect in Silverlight. We all know that Silverlight doesn't support ADO.NET. You can not directly call ADO.NET code from SilverLight application but you can call a WCF service. You can convert Dataset into List and just pass it over to Silverlight Application Via WCF.


Here is one way you can use MYSQL with Silverlight.


I have just created a class called City and in the List object of City I have filled all the City Names and binded it with DataGrid.


You can download the source code from Project/Source Code.


Let me know if you find any issues with the Source code.


NOTE: I have not added mysql connection string so first put the connection string in WebConfig file in SilverlightAndMySQL.Services Project.


Happy Coding :)

6 comments:

  1. Can you please explain a bit, cos codes won't help much.

    ReplyDelete
  2. Everything...Would appreciate this tutorial, step by step with images.


    Thanks

    ReplyDelete
  3. Hi!
    Will this method work for a app that needs to be hosted on a Linux server?

    ReplyDelete
  4. I have never run this on Linux but you can check it yourself.

    ReplyDelete
  5. I can not download your sample!
    Any problems with skydrive?

    ReplyDelete