相关疑难解决方法(0)

尝试将Nhibernate与Mono和SQLite一起使用 - 找不到System.Data.SQLite

我用单声道(C#)编写了一个简单的应用程序,它使用NHibernate和MYSQL - 现在我想把它移植到SQLite.

我希望我能简单地改变hibernate.cfg.xml并将其指向不同的数据库.这是我修改过的hibernate.cfg.xml:

    <?xml version="1.0" encoding="utf-8" ?>

    <hibernate-configuration  xmlns="urn:nhibernate-configuration-2.2" >
        <session-factory name="NHibernate.Test">
            <property name="connection.driver_class">NHibernate.Driver.SQLite20Driver</property>
            <property name="connection.connection_string">
                Data Source=nhibernate_test.db;Version=3
            </property>
            <property name="dialect">NHibernate.Dialect.SQLiteDialect</property>
            <property name="query.substitutions">true=1;false=0</property>
            <property name="proxyfactory.factory_class">NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu</property>
        </session-factory>

</hibernate-configuration> 
Run Code Online (Sandbox Code Playgroud)

问题是我收到一个错误,它无法找到System.Data.SQLite.这并不让我感到惊讶,因为据我所知,单声道我们应该使用Mono.Data.SQLite.

问题是(假设我正确理解了问题)我不知道如何告诉NHibernate使用Mono.Data.SQLite而不是System.Data.SQLite.

这一切都是在Linux上完成的 - 如果这有任何区别的话.

有没有人有任何想法如何进行?

c# sqlite nhibernate mono

7
推荐指数
1
解决办法
3632
查看次数

标签 统计

c# ×1

mono ×1

nhibernate ×1

sqlite ×1