When Silverlight runs in Out of Browser mode and off line, can it get the Sql Server Data from a DataBase located in the local disk by means of an ADO Entity Data Model?
Asked
Active
Viewed 317 times
1 Answers
0
I don't think Entity Framework can run in Silverlight due to restrictions imposed by the Silverlight security model (and AFAIK System.Data.dll not available in Silverlight). Typically people use WCF data services client in Silverlight to connect to a data service that exposes your database.

Pawel
- 31,342
- 4
- 73
- 104
-
Ok, suppose I have a Silverlight app running in out of the browser mode, and it's offline, can I access a Sql Server database in the local hard disk, from this SL App? Can I just develop a OOB Silverlight project and execute it as I would do if it was a WPF project? – Rafael Oct 12 '12 at 20:57
-
I think it's hard. You can take a look at these: http://stackoverflow.com/questions/111196/local-database-with-silverlight and http://silverlight4sqllib.codeplex.com/ – Pawel Oct 12 '12 at 22:23
-
Thank you. I get that you can only access some special files, but not a database... – Rafael Oct 12 '12 at 23:45
-
@Rafael you can get full access to the hard drive (with caveats like the missing DriveInfo struct) or P/Invoke your way to whatever IF you use a signed app with elevated trust since SL5. – jv42 Oct 13 '12 at 12:19
-
Another problem with accessing database is that System.Data.dll is a mixed assembly (i.e. it contains both native and managed code) and Silverlight AFAIK Silverlight runtime cannot execute native code... – Pawel Oct 13 '12 at 20:20