Share via


ConventionPrimitivePropertyConfiguration.HasPrecision Method

Definition

Overloads

HasPrecision(Byte, Byte)

Configures the precision and scale of the Decimal property.

HasPrecision(Byte)

Configures the precision of the DateTime property. If the database provider does not support precision for the data type of the column then the value is ignored.

HasPrecision(Byte, Byte)

Configures the precision and scale of the Decimal property.

public virtual System.Data.Entity.ModelConfiguration.Configuration.ConventionPrimitivePropertyConfiguration HasPrecision (byte precision, byte scale);
abstract member HasPrecision : byte * byte -> System.Data.Entity.ModelConfiguration.Configuration.ConventionPrimitivePropertyConfiguration
override this.HasPrecision : byte * byte -> System.Data.Entity.ModelConfiguration.Configuration.ConventionPrimitivePropertyConfiguration
Public Overridable Function HasPrecision (precision As Byte, scale As Byte) As ConventionPrimitivePropertyConfiguration

Parameters

precision
Byte

The precision of the property.

scale
Byte

The scale of the property.

Returns

The same ConventionPrimitivePropertyConfiguration instance so that multiple calls can be chained.

Remarks

Calling this will have no effect once it has been configured. This method will throw if the property is not a Decimal.

Applies to

HasPrecision(Byte)

Configures the precision of the DateTime property. If the database provider does not support precision for the data type of the column then the value is ignored.

public virtual System.Data.Entity.ModelConfiguration.Configuration.ConventionPrimitivePropertyConfiguration HasPrecision (byte value);
abstract member HasPrecision : byte -> System.Data.Entity.ModelConfiguration.Configuration.ConventionPrimitivePropertyConfiguration
override this.HasPrecision : byte -> System.Data.Entity.ModelConfiguration.Configuration.ConventionPrimitivePropertyConfiguration
Public Overridable Function HasPrecision (value As Byte) As ConventionPrimitivePropertyConfiguration

Parameters

value
Byte

Precision of the property.

Returns

The same ConventionPrimitivePropertyConfiguration instance so that multiple calls can be chained.

Remarks

Calling this will have no effect once it has been configured. This method will throw if the property is not a DateTime.

Applies to