ConventionPrimitivePropertyConfiguration.HasPrecision Method
Configures the precision of the DateTime property.
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() | 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. |
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.
Parameters
- value
-
Type:
System.Byte
Precision of the property.
Return Value
Type: System.Data.Entity.ModelConfiguration.Configuration.ConventionPrimitivePropertyConfigurationThe same ConventionPrimitivePropertyConfiguration instance so that multiple calls can be chained.
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.
Return Value
Type: System.Data.Entity.ModelConfiguration.Configuration.ConventionPrimitivePropertyConfigurationThe same ConventionPrimitivePropertyConfiguration instance so that multiple calls can be chained.
Calling this will have no effect once it has been configured. This method will throw if the property is not a Decimal.