- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我无法让 SQLite 驱动程序在我的 session 工厂中工作。
我从 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;
}
}
这就是我生成配置器的方式
问题是当我构建 session 工厂时出现以下错误:
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 天。
如果您需要更多信息,请告诉我。
感谢您的帮助!
查尔斯
最佳答案
当我遇到这个问题时,它是由我的应用程序的处理器属性设置为 anycpu 并在 64 位系统上运行引起的。为更正此问题,我将我的应用程序处理器属性设置为 x86。我认为 System.Data.SQLite.dll 不支持在 x64 进程下运行。
关于unit-testing - FluentNhibernate 和 SQLite,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/845490/
我正在使用 Team City 进行持续集成,用于 .Net 4 ASP MVC 3 应用程序。 在我的开发机器上,我可以构建和运行我的应用程序,但在构建服务器上我收到以下错误: ASPNETCOM
我有以下实体 我试图在 FluentNHibernate 的帮助下映射它们。 关于实体的一些说明: 属性 CreatedBy和 AssignedTo在 Task实体是 Person 类型,在数据库端是
我有一个名为权限的枚举。可以为用户分配权限,也可以为角色分配权限,然后为用户分配角色。 User 和 Role 都有这样的属性: public virtual IList Permissions {
有没有一种简单的方法为所有生成的表名加上字符串前缀? 惯例 Table.Is(x => "Prefix" + x.EntityType.Name) 仅适用于实体表(不适用于联接表或子类表) 我似乎找不
给定一个 Vehicle 类和一个 VehicleProperty 类... public class Vehicle { public virtual int Id { get; prote
出于某种原因,我无法正确完成此查询,而且我不明白为什么... 我有一个名为“博客”的对象,它有一个 ID 和一个“标签”列表。 每个“标签”都有一个 ID 和一个“名称”属性。 由于这是多对多关系,我
我有一个简单的 Fluent-NHibernate 映射让我很头疼!我正在尝试为其中一个实体映射字典,但它的 FK 仍然为空。 这是实体代码: public class Person { pu
我对 FluentNhibernate 公式映射有疑问。我需要在公式中使用联接表中的一列。 问题在以下三个表中得到证明:City, Person, Address class Person {
我有一个非常简单的数据库表,它以多对多关系连接另外两个表。 (几乎是将用户加入到问题中——想想书签) 此表的 NHibernate 实体如下所示: public class UserToRequest
我尝试通过使用多个 .Mappings 扩展调用手动添加映射类,但它似乎只包括最后一个。那么如何添加几个选定的类映射或多个程序集呢? 我的流畅配置通常如下所示: Return Fluently.Co
好的,所以昨天我设法获得了 NHibernate 和 FluentNHibernate 的最新主干版本,以用于我最新的小项目。 (我正在开发一个错误跟踪应用程序。)我使用 Repository 模式创
我遇到了 FluentNHibernate 的问题,希望有人可以帮助我。 我在名为 CampaignAreas 和 CampaignProducts 的两个类之间存在多对多关系。遗憾的是,Fluent
在我的应用程序中,我经常使用 FluentNHibernate。不幸的是,a Visual Studio Bug has forced me to get a different FNH versio
使用 Fluent NHibernate 映射简单的 Dictionary 属性的最佳方法是什么? 最佳答案 public class PersistedData { public virtu
我正在尝试使用 FluentNHibernate 创建与同一实体的关系,但不知道如何操作。有人成功了吗?你能帮帮我吗? 这是我的实体类: public class Menu { public
我有一个基类,其中包含一个名为 IsDirty 的属性。这是用于域模型的,不是数据库表中的列。 使用自动映射时,Fluent nhibernate 会尝试将此列添加到表中。解决此问题的一种方法是输入
我定义了以下数据库表: 俱乐部:身份证、姓名 成员:身份证、姓名 ClubMember: ClubId, MemberId 我定义了以下实体类: public class Club() {
我正在为尝试使用遗留数据库模式创建映射的当前场景而苦苦挣扎: 我有一对由组合键链接的父/子类,我正在使用 FluentNHibernate 创建它们之间的映射和关联。以下是类(class): /*Pa
FluentNHibernate 的自动映射是否支持通过约定创建多列唯一约束? 我可以轻松地创建单列唯一约束: public void Apply(IPropertyInstance instance
我正在将我的应用程序切换到 Postgresql,我的架构中的所有表都是小写的,当我使用 NHibernate 进行查询时,它会向映射中的表名添加双引号是 PascalCase 并导致查询失败,告诉我
我是一名优秀的程序员,十分优秀!