适用于 Windows 7 手机的 ORM 映射器
我考虑在 win7 手机上使用 SQLite 来开发我的应用程序。我正在寻找一个适用于 Windows 7 手机和 SQLite 的 ORM 映射器。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
到目前为止,我发现以下支持 WP7 的 ORM:
希望它对某人有帮助。
So far I've found following ORM's that support WP7:
Hope it helps somebody.
我为 Compact Framework 创建了一个轻量级、可扩展的 ORM。虽然我的参考实现使用 SQL Compact,但我认识一位开发人员,他只需按照 SQL Compact 版本作为模板,就可以在不到一天的时间内在 WinPhone 上使用 SQLite。我一直想自己做这个移植,只是没有时间。
值得注意的是,此时他也放弃了它,因为 SQLite(不是 ORM 框架)非常非常慢。
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.
如果您不相信使用 SQLite,您应该尝试 Db4o。它是一个面向对象的数据库,因此您不需要 ORM 工具(假设您只需要对象映射)。此外,它还支持 linq 查询。
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.
在 SQLite 和 sub-sonic 上有人提出了有关 Subsonic 对 SQLite 支持的问题
。该平台上还没有官方支持的数据库,我还没有看到有人尝试为人们创建的各种数据库实现编写通用的 ORM。
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.
有 Perst :http://www.mcobject.com/perst。我现在就在用,还没收到太多反馈。它使用 ActiveRecord 作为持久性模式。没有很多文档等,但它存在......这里的一个例子:http://mobileworld.appamundi.com/blogs/andywigley/archive/2010/06/07/perst-a-database-for- windows-phone-7-silverlight.aspx
http://siaqodb.com/ :看起来很有希望,但是不是免费的
SQLLite 会很酷,Silverlight 上有完整的 C# 实现,因此 WP7 并不遥远。有这个 POC http:// /sviluppomobile.blogspot.com/2010/03/sqlite-for-wp-7-series-proof-of-concept.html 但它只有 SQlLite,没有要查询的对象 APi,商店等...
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...
您可能想查看 sqlite-net。原始库实际上是针对 Mono 和 MonoTouch 的,但也有一个针对 Compact Framework 的移植。它包含一个简单的 ORM。要能够在 WP7 上运行 sqlite 可能有点棘手(必须使用独立存储),但您可以尝试使用 这个概念证明库。
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.
难道不是房间里的大象 Linq to SQL ,因为这与手机一起提供,没有额外的依赖项(自 Mango 以来)?
Isn't the elephant in the room Linq to SQL, as this comes with the phone with no additional dependencies (since Mango)?