IConventionEntityTypeBuilder.CanSetPropertyAccessMode 方法

定義

傳回值,指出是否可以從目前的組態來源設定指定的 PropertyAccessMode

public bool CanSetPropertyAccessMode (Microsoft.EntityFrameworkCore.PropertyAccessMode? propertyAccessMode, bool fromDataAnnotation = false);
abstract member CanSetPropertyAccessMode : Nullable<Microsoft.EntityFrameworkCore.PropertyAccessMode> * bool -> bool
Public Function CanSetPropertyAccessMode (propertyAccessMode As Nullable(Of PropertyAccessMode), Optional fromDataAnnotation As Boolean = false) As Boolean

參數

propertyAccessMode
Nullable<PropertyAccessMode>

PropertyAccessMode要用於這個模型屬性的 。 null 要重設為預設值。

fromDataAnnotation
Boolean

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

傳回

true 如果可以設定指定的 PropertyAccessMode ,則為 。

適用於