使用 NHibernate 和 Mono.Data.SQLite
我阅读并实现了 尝试使用 Nhibernate与单声道和SQLite - 找不到 System.Data.SQLite 然而,正如最后一条评论所述,这似乎不适用于 NHibernate 3.1
错误是
HibernateException:IDbCommand 和 IDbConnection 实现 无法找到程序集 Mono.Data.Sqlite。确保 程序集 Mono.Data.Sqlite 是 [...可访问...]
我在 GAC 中有 Mono.Data.Sqlite。
我尝试过指定“Mono.Data.Sqlite”以及 typeof(Mono.Data.Sqlite.SqliteConnection).Assembly.FullName
作为程序集的名称
有没有人有任何想法如何得到这个在职的?
I read and implemented Trying to using Nhibernate with Mono & SQLite - can't find System.Data.SQLite
However, as the last comment there states this seems not to work with NHibernate 3.1
The error is
HibernateException: The IDbCommand and IDbConnection implementation in
the assembly Mono.Data.Sqlite could not be found. Ensure that the
assembly Mono.Data.Sqlite is [...reachable...]
I have Mono.Data.Sqlite in the GAC.
I have tried both specifying "Mono.Data.Sqlite" as well as typeof(Mono.Data.Sqlite.SqliteConnection).Assembly.FullName
as the name of the assembly
Has anyone any Ideas how to get this working?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
的答案有问题尝试将 Nhibernate 与 Mono & 一起使用SQLite - 找不到 System.Data.SQLite 。
为了使给定的构造函数(3 个参数)正常工作,需要首先加载相关程序集 (Mono.Data.Sqlite)。
如果像这样使用 4 参数基本构造函数,则此方法有效:(
不过,归功于 http://intellect.dk/post/Why-I-love-frameworks-with-lots-of-extension-points.aspx对于最初的想法 - 谢谢。)
如果您使用 FluentNHibernate,那么您还需要:
到目前为止我还没有遇到任何问题......
There is a problem in the answer of Trying to using Nhibernate with Mono & SQLite - can't find System.Data.SQLite .
For the given constructor (3 parameters) to work the assembly in question (Mono.Data.Sqlite) needs to be loaded first.
This works if the 4-parameter base contructor is used like this:
(Still, credit goes to http://intellect.dk/post/Why-I-love-frameworks-with-lots-of-extension-points.aspx for the original idea - thanks.)
And if you use FluentNHibernate, then you'll also need:
I have not encountered any problems so far...