Fluent NHibernate IDictionary with composite element mapping

折月煮酒 提交于 2019-12-06 01:56:10

I think the mapping you're looking for is something like this:

HasMany<CategoryResource>(x => x._resources)
.AsMap<string>("LangCode")
.KeyColumn("EntityID")
.Table("CategoryResources")
.Component(x =>
    {
        x.Map(c => c.Name);
        x.Map(c => c.Description);
    })
.Cascade.All();
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!