共用方式為


ConventionPrimitivePropertyConfiguration.HasPrecision 方法

定義

多載

HasPrecision(Byte, Byte)

設定屬性的 Decimal 精確度和小數位數。

HasPrecision(Byte)

設定 屬性的有效 DateTime 位數。 如果資料庫提供者不支援資料行資料類型的有效位數,則會忽略該值。

HasPrecision(Byte, Byte)

設定屬性的 Decimal 精確度和小數位數。

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

參數

precision
Byte

此屬性的有效位數。

scale
Byte

此屬性的小數位數。

傳回

相同的 ConventionPrimitivePropertyConfiguration 實例,以便鏈結多個呼叫。

備註

一旦設定之後,呼叫此動作將不會有任何作用。 如果 屬性不是 Decimal ,這個方法將會擲回。

適用於

HasPrecision(Byte)

設定 屬性的有效 DateTime 位數。 如果資料庫提供者不支援資料行資料類型的有效位數,則會忽略該值。

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

參數

value
Byte

屬性的有效位數。

傳回

相同的 ConventionPrimitivePropertyConfiguration 實例,以便鏈結多個呼叫。

備註

一旦設定之後,呼叫此動作將不會有任何作用。 如果 屬性不是 DateTime ,這個方法將會擲回。

適用於