語言

IConventionModelBuilder.CanSetPropertyAccessMode 方法

定義

回傳一個值,表示是否能從目前組態來源設定該屬性存取模式

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用於此模型的性質。

fromDataAnnotation
Boolean

表示配置是否以資料註解方式指定。

傳回

true 如果給定屬性的存取模式可以設定。

適用於