开发者

Silverlight 4 & SQLite

I've been doing some research on finding an embedded database to be us开发者_如何学Pythoned with Silverlight/isolated storage. Everyone says SQLite will not work with Silverlight due to unmanaged code.

From my experience there is just a dll named System.Data.SQLite.DLL which I believe I either got from installed SQLite.NET or from the NHibernate build.

When configuring in c# code you can use a file based database and just specify a file to use.

So my question is where is the unmanaged code? And why wouldn't using file based database and writing it to isolated storage work? And now that Silverlight 4 supports OOB does that have any impact on this?

Answers appreciated ahead of time.

Regards


I'm not sure what features you need, but you might also want to check out Sterling

Sterling is a lightweight object-oriented database implementation for Silverlight and Windows Phone 7 that works with your existing class structures. Sterling supports full LINQ to Object queries over keys and indexes for fast retrieval of information from large data sets.

Here is the introduction blog post about this project.

Note: At the time of this post Sterling has not been released. You can download the source code though.


SQLite as downloadable from sqlite.org is written in ANSI-C (see the features page). That's what most people are thinking of when you say "SQLite" and it's definitely unmanaged code.

System.Data.SQLite.DLL appears to be "An open source ADO.NET provider for the SQLite database engine" and is "a complete drop-in replacement for the original sqlite3.dll (you can even rename it to sqlite3.dll if you're using it natively)" which seems pretty cool.

However, reading on, I see "The desktop native SQLite library and the ADO.NET wrapper are combined into a single mixed assembly" which seems to be saying that the DLL contains both managed and unmanaged code, which may be a problem.


There is no ADO.Net in Silverlight 4

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜