Believe it or not, my first project with MongoDB was in Silverlight. IronPython, some C #. That was in 2009, and we went live with something like 0.8 or 0.9 MongoDB ... so that was a bit.
It was, I think, 2.x Silverlight, so it was harder to complete tasks such as direct connections to the database. However, I would still recommend following the route that I went at that time.
Use the REST + JSON API on your server and keep in touch with the client. We worked in Python, but these days there are some awesome ready-made Mongo REST interfaces, such as Sleepy Mongoose , if you don't want to roll back your own.
The biggest advantage of this is the security issue: if you directly connect the database from the client to the server, even with authentication, you run the risk of getting into your database ... at that moment they can do whatever they want, MongoDB Authentication restricts access at the database level, but not that people can see or delete. In some cases, this does not even require disassembling the code, as there are, as I recall, development browser plugins that allow you to script a working Silverlight application from IronPython and IronRuby.
There are other reasons, including a synchronous question, but overall I think that having a server interface for Mongo with a clean, secured facade that speaks to Silverlight will serve you better.
source share