ConventionPropertyExtensions.SetScale 方法

定義

設定此屬性中允許的資料小數位數。 例如,如果 屬性是 Decimal ,則這是小數位數的最大數目。

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

參數

property
IConventionProperty

屬性。

scale
Nullable<Int32>

這個屬性中允許的小數位數上限。

fromDataAnnotation
Boolean

指出是否已使用資料批註指定組態。

傳回

適用於