I thinking of using SQLite with win7 phone for development of my app. I looking for an ORM mapper开发者_开发问答 which will work with Windows 7 phone and SQLite.
So far I've found following ORM's that support WP7:
- Vici CoolStorage
- mentioned already OpenNETCF.ORM Framework
- Mono.Data.Sqlite.Orm
Hope it helps somebody.
I created a lightweight, extensible ORM for the Compact Framework. While my reference implementation uses SQL Compact, I know one developer who got it working with SQLite on WinPhone in less than a day by simply following the SQL Compact version as a template. I've been meaning to do that port myself, I've just not found the time.
It's probably worth noting at this point that he also abandoned it because SQLite (not the ORM framework) was very, very slow.
If you are not convinced of using SQLite, you should give Db4o a try. It is an object oriented database, so you won't need an ORM tool (assuming that you just want object mapping). Also, it supports linq queries.
A questions has been asked about Subsonic support for SQLite at SQLite and sub-sonic
However, as there are no officialliy supported databases on the platform yet, I've not seen anyone attempt to write a generic ORM for the various database implementations people have created.
There's Perst : http://www.mcobject.com/perst. I'm using it now, not a lot of feedback yet. It uses ActiveRecord as persistance pattern. Not a lot of documentation etc. but it exists so ... An example here : http://mobileworld.appamundi.com/blogs/andywigley/archive/2010/06/07/perst-a-database-for-windows-phone-7-silverlight.aspx
http://siaqodb.com/ : seems promising but not free
SQLLite would be cool, there's a full C# implementation available on Silverlight, so WP7 is not so far away. There's this POC http://sviluppomobile.blogspot.com/2010/03/sqlite-for-wp-7-series-proof-of-concept.html but it's only SQlLite, no object APi to query, store etc...
You might want to have a look at sqlite-net. The original library is actually targetted for Mono and MonoTouch, but there is also a port to Compact Framework. It contains a simple ORM. To be able to run sqlite on WP7 may be a bit tricky (has to use Isolated Storage), but you can try using this proof of concept library.
Isn't the elephant in the room Linq to SQL, as this comes with the phone with no additional dependencies (since Mango)?
精彩评论