NHibernate中可空类型配置出错,一天了还未解决,请指教

NHibernate中可空类型配置出错:

1. .hbm    

    <!-- 用户ID  -->
    <property name="UserID" type="System.Nullable`1[[System.Int64, mscorlib]], mscorlib">
      <column name="UserID" sql-type="bigint" length="8" not-null="false"/>
    </property>

2. Domain        

        private Int64? _UserID;
        /// <summary>
        /// 用户ID
        /// </summary>
        public virtual Int64? UserID
        {
            set { _UserID = value; }
            get { return _UserID; }
        }

3. 错误内容:    

在列“UserID0_0_”上的 GetBytes 尝试无效。GetBytes 函数只能用在 Text、NText 或 Image 类型的列上。

原文地址:https://www.cnblogs.com/liuweitoo/p/2588483.html