Dela via


ConventionPropertyExtensions.SetPrecision Method

Definition

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

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

Parameters

property
IConventionProperty

The property.

precision
Nullable<Int32>

The maximum number of digits that is allowed in this property.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

Applies to