ConventionPropertyExtensions.SetScale Method

Definition

Sets the scale of data that is allowed in this property. For example, if the property is a Decimal then this is the maximum number of decimal places.

public static int? SetScale (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, int? scale, bool fromDataAnnotation = false);
static member SetScale : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * Nullable<int> * bool -> Nullable<int>
<Extension()>
Public Function SetScale (property As IConventionProperty, scale As Nullable(Of Integer), Optional fromDataAnnotation As Boolean = false) As Nullable(Of Integer)

Parameters

property
IConventionProperty

The property.

scale
Nullable<Int32>

The maximum number of decimal places that is allowed in this property.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

Applies to