ConventionPrimitivePropertyConfiguration.HasPrecision Method

 

Configures the precision of the DateTime property.

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

NameDescription
System_CAPS_pubmethodHasPrecision(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.

System_CAPS_pubmethodHasPrecision(Byte, Byte)

Configures the precision and scale of the Decimal property.


ConventionPrimitivePropertyConfiguration.HasPrecision Method (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 ConventionPrimitivePropertyConfiguration HasPrecision(
	byte value
)

Parameters

value
Type: System.Byte

Precision of the property.

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


ConventionPrimitivePropertyConfiguration.HasPrecision Method (Byte, Byte)

Configures the precision and scale of the Decimal property.

public virtual ConventionPrimitivePropertyConfiguration HasPrecision(
	byte precision,
	byte scale
)

Parameters

precision
Type: System.Byte

The precision of the property.

scale
Type: System.Byte

The scale of the property.

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