configuration - 如何使用 Fluent NHibernate 自动映射来映射字典?

标签 configuration fluent-nhibernate dictionary automapping

我有这样一个实体:

public class Land
{
    public virtual IDictionary<string, int> Damages { get; set; }
    // and other properties
}

每次我尝试通过以下代码使用自动映射时:

var sessionFactory = Fluently.Configure()
    .Database(SQLiteConfiguration.Standard.InMemory)
    .Mappings(m => m.AutoMappings.Add(AutoMap.AssemblyOf<Land>))
    .BuildSessionFactory();

我收到以下错误:

{"The type or method has 2 generic parameter(s), but 1 generic argument(s) were
provided. A generic argument must be provided for each generic parameter."}

有人可以告诉我我做错了什么吗?另外,这只是一个简单的例子。我的词典比这本多得多。

最佳答案

NHibernate 是不可能的。

关于configuration - 如何使用 Fluent NHibernate 自动映射来映射字典?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1943071/

相关文章:

configuration - web.xml 中的错误页面指令无法正确显示 UTF8

java - 使用 java 8 Stream 将字符串映射

php - 日期/时间配置选项的使用

c - 使用每个选项列表简化编译

nhibernate - 流利的NHibernate Visual Designer

NHibernate, "On Delete Cascade",级联删除相关表中的行?

c# - 使用 nHibernate 的 CreateSQLQuery 时如何保留列顺序?

python - 在磁盘上存储 Python 字典的有效方法?

javascript - for in 循环不打印所有元素 - Javascript

android - 如何在 Eclipse 中更改 Android 控制台的字体?