I've开发者_JAVA技巧 done some cursory reading on Silverlight and data access. From what I can tell, I'll need a web service to hook up a Silverlight application to a database while it's running in browser. Is this true when it goes OOB? Or is there another method that should be used then?
Some background: We have a .Net 2.0 Winforms application. We're trying to convert the functionality to a web app of some sort without rewriting the business logic. Our internal web developers all write in ColdFusion, so Adobe Air seemed to be a natural fit. However, we've found out that the only way to consume a .Net dll in Air is to write an EXE that makes function calls. (Perhaps something like a WCF service on the local machine.) Since that's the case, I thought I'd see how the data access was in Silverlight OOB, because we will have customers with limited-to-no internet connectivity and will need to be able to access an offline DB.
As far as I know, whether it runs in or out of browser it will need a web service or other means to hit a database. You cannot do it through the Silverlight application because of the sandbox security model used.
In 4.0 there is the added use of COM so you may be able to use that to your advantage.
Otherwise you would just be using a file stored in IsolatedStorage to persist data to, like an XML file for example. Maybe this is what you are looking for though?
精彩评论