/// <summary> /// Specifies SQL Server DECIMAL data type for column. /// </summary> /// <param name="column">The column.</param> /// <param name="precision">The precision of the data type.</param> /// <param name="scale">The scale of the data type.</param> /// <returns>This column for fluent coding.</returns> public static _Decimal AsSqlDecimal(this _Decimal column, byte precision = DEFAULT_DECIMAL_PRECISION, byte scale = DEFAULT_DECIMAL_SCALE) { column.VerifyNotNull(nameof(column)); if (precision < MIN_DECIMAL_PRECISION || precision > MAX_DECIMAL_PRECISION) { throw new ArgumentOutOfRangeException(nameof(precision)); } if (scale < 0 || scale > precision) { throw new ArgumentOutOfRangeException(nameof(scale)); } column.SetSqlType(SqlType.Decimal(column, precision, scale)); return(column); }
/// <summary> /// Specifies SQL Server MONEY data type for column. /// </summary> /// <param name="column">The column.</param> /// <returns>This column for fluent coding.</returns> public static _Decimal AsSqlMoney(this _Decimal column) { column.VerifyNotNull(nameof(column)); column.SetSqlType(SqlType.Money(column)); return(column); }