Tôi không thể tải Trình điều khiển SQLite hoạt động trong phiên làm việc của mình.FluentNhibernate và SQLite
Tôi đã tải về SQLite 1.0.48 từ http://sqlite.phxsoftware.com/
Tôi đã thêm các tài liệu tham khảo để System.Data.SQLite trong dự án thử nghiệm của tôi.
public static IPersistenceConfigurer GetSqlLiteConfigurer()
{
try
{
return SQLiteConfiguration
.Standard
.InMemory();
}
catch (Exception ex)
{
throw ex;
}
}
Đây là cách tôi tạo ra Configurer
Vấn đề là khi tôi xây dựng sessionfactory của tôi, tôi nhận được lỗi sau:
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()
tôi đã cố gắng thay đổi của phiên bản SQLite nhưng không khắc phục sự cố.
Tôi không thể tìm thấy vấn đề là gì và tôi đã làm việc này trong 2 ngày nay.
Hãy cho tôi biết nếu bạn cần thêm thông tin.
Cảm ơn sự giúp đỡ!
Charles
Cảm ơn. Điều này giải quyết vấn đề cho tôi. – statenjason
Hiện có sẵn dưới dạng Gói NuGet http: // nuget.org/List/Packages/SQLitex64 –