Example #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="precision"></param>
        /// <param name="scale"></param>
        /// <returns></returns>
        public static DecimalSqlType GetDecimal(byte precision, byte scale)
        {
            string key = GetKeyForPrecisionScaleBased(typeof(DecimalSqlType).Name, precision, scale);

            DecimalSqlType returnSqlType = ( DecimalSqlType )sqlTypes[key];

            if (returnSqlType == null)
            {
                returnSqlType = new DecimalSqlType(precision, scale);
                sqlTypes.Add(key, returnSqlType);
            }

            return(returnSqlType);
        }
		/// <summary>
		/// 
		/// </summary>
		/// <param name="sqlType"></param>
		internal DecimalType( DecimalSqlType sqlType ) : base( sqlType )
		{
		}
		/// <summary>
		/// 
		/// </summary>
		/// <param name="precision"></param>
		/// <param name="scale"></param>
		/// <returns></returns>
		public static DecimalSqlType GetDecimal( byte precision, byte scale )
		{
			string key = GetKeyForPrecisionScaleBased( typeof( DecimalSqlType ).Name, precision, scale );

			DecimalSqlType returnSqlType = ( DecimalSqlType ) sqlTypes[ key ];
			if( returnSqlType == null )
			{
				returnSqlType = new DecimalSqlType( precision, scale );
				sqlTypes.Add( key, returnSqlType );
			}

			return returnSqlType;

		}