/// <summary>
        ///
        /// </summary>
        /// <param name="precision"></param>
        /// <param name="scale"></param>
        /// <returns></returns>
        public static NullableType GetDecimalType(byte precision, byte scale)
        {
            string       key        = GetKeyForPrecisionScaleBased(NHibernateUtil.Decimal.Name, precision, scale);
            NullableType returnType = ( NullableType )typeByTypeOfName[key];

            if (returnType == null)
            {
                returnType = new DecimalType(SqlTypeFactory.GetDecimal(precision, scale));
                AddToTypeOfNameWithPrecision(key, returnType);
            }

            return(returnType);
        }
示例#2
0
        public static NullableType GetDecimalType(byte precision, byte scale)
        {
            string key = GetKeyForPrecisionScaleBased(NHibernateUtil.Decimal.Name, precision, scale);
            NullableType returnType = (NullableType) typeByTypeOfName[key];
            if (returnType == null)
            {
                returnType = new DecimalType(SqlTypeFactory.GetDecimal(precision, scale));
                AddToTypeOfNameWithPrecision(key, returnType);
            }

            return returnType;
        }