SqlProviderServices.TruncateDecimalsToScale Property

Entity Framework 6.0

Set this flag to false to prevent Decimal values from being truncated to the scale (number of decimal places) defined for the column. The default value is true, indicating that decimal values will be truncated, in order to prevent breaking existing applications that depend on this behavior.

Namespace:   System.Data.Entity.SqlServer
Assembly:  EntityFramework.SqlServer (in EntityFramework.SqlServer.dll)

public static bool TruncateDecimalsToScale { get; set; }

Property Value

Type: System.Boolean

Returns Boolean.

With this flag set to true SqlParameter objects are created with their Scale properties set. When this flag is set to false then the Scale properties are not set, meaning that the truncation behavior of SqlParameter is avoided.

Return to top