我无法让 SQLite 驱动程序在我的 sessionfactory 中工作。
我从http://sqlite.phxsoftware.com/下载了 SQLite 1.0.48
我在我的测试项目中添加了对 System.Data.SQLite 的引用。
public static IPersistenceConfigurer GetSqlLiteConfigurer()
{
try
{
return SQLiteConfiguration
.Standard
.InMemory();
}
catch (Exception ex)
{
throw ex;
}
}
这就是我生成配置器的方式
问题是当我构建我的 sessionfactory 时,我收到以下错误:
NHibernate.HibernateException: The IDbCommand and IDbConnection implementation in the assembly System.Data.SQLite could not be found. Ensure that the assembly System.Data.SQLite is located in the application directory or in the Global Assembly Cache. If the assembly is in the GAC, use <qualifyAssembly/> element in the application configuration file to specify the full name of the assembly.
at NHibernate.Driver.ReflectionBasedDriver..ctor(String driverAssemblyName, String connectionTypeName, String commandTypeName)
at NHibernate.Driver.SQLite20Driver..ctor()
我试图更改 SQLite 版本,但没有解决问题。
我找不到问题所在,我已经为此工作了 2 天。
如果您需要更多信息,请与我们联系。
谢谢您的帮助!
查尔斯