城堡设施NHibernateIntegration for NHibernate 4.0

时间:2014-09-29 07:00:41

标签: c# nhibernate fluent-nhibernate castle-windsor castle

我从(https://github.com/mahara/Castle.Facilities.NHibernateIntegration

下载了NHibernateIntegration的源代码

我添加了对Castle.Core(3.3.0.0),Castle.Services.Transaction(3.3.0.0),Castle.Windsor(3.3.0.0),NHibernate(4.0.0.4000)的引用,我构建了应用程序以生成Castle.Facilities.NHibernateIntegration.dll

但是在我的应用程序中升级NHibernateIntegration.dll后,我收到以下错误,

未为指定的别名映射ISessionFactory组件:AliasName

1 个答案:

答案 0 :(得分:0)

尝试更新NullSafeGet(IDataReader rs,字符串名称)代码
NHibernate.Type.NullSafeGet到

public virtual object NullSafeGet(IDataReader rs, string name)
    {
        int index = 0;

        try
        {
            name = name.ToUpperInvariant();
            index = rs.GetOrdinal(name);

        }
        catch (Exception ex)
        {
            throw new Exception(string.Format("{0} Not Found", name));
        }

... }