MutableModelExtensions.SetPropertyAccessMode 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| SetPropertyAccessMode(IMutableModel, Nullable<PropertyAccessMode>) |
設定 以 PropertyAccessMode 作為該模型中所有實體類型的屬性的使用。 請注意,個別實體類型可以覆寫此存取模式,而實體類型的個別屬性也能覆蓋該實體類型設定的存取模式。 此處設定的值將用於任何未指定覆寫的屬性。 |
| SetPropertyAccessMode(IMutableModel, Nullable<PropertyAccessMode>) |
設定 以 PropertyAccessMode 作為該模型中所有實體類型的屬性的使用。 請注意,個別實體類型可以覆寫此存取模式,而實體類型的個別屬性也能覆蓋該實體類型設定的存取模式。 此處設定的值將用於任何未指定覆寫的屬性。 |
SetPropertyAccessMode(IMutableModel, Nullable<PropertyAccessMode>)
設定 以 PropertyAccessMode 作為該模型中所有實體類型的屬性的使用。
請注意,個別實體類型可以覆寫此存取模式,而實體類型的個別屬性也能覆蓋該實體類型設定的存取模式。 此處設定的值將用於任何未指定覆寫的屬性。
public static void SetPropertyAccessMode(this Microsoft.EntityFrameworkCore.Metadata.IMutableModel model, Microsoft.EntityFrameworkCore.Metadata.PropertyAccessMode? propertyAccessMode);
static member SetPropertyAccessMode : Microsoft.EntityFrameworkCore.Metadata.IMutableModel * Nullable<Microsoft.EntityFrameworkCore.Metadata.PropertyAccessMode> -> unit
<Extension()>
Public Sub SetPropertyAccessMode (model As IMutableModel, propertyAccessMode As Nullable(Of PropertyAccessMode))
參數
- model
- IMutableModel
要設定存取模式的型號。
- propertyAccessMode
- Nullable<PropertyAccessMode>
該 PropertyAccessMode,或空值以清除模式集合。
適用於
SetPropertyAccessMode(IMutableModel, Nullable<PropertyAccessMode>)
設定 以 PropertyAccessMode 作為該模型中所有實體類型的屬性的使用。
請注意,個別實體類型可以覆寫此存取模式,而實體類型的個別屬性也能覆蓋該實體類型設定的存取模式。 此處設定的值將用於任何未指定覆寫的屬性。
public static void SetPropertyAccessMode(this Microsoft.EntityFrameworkCore.Metadata.IMutableModel model, Microsoft.EntityFrameworkCore.PropertyAccessMode? propertyAccessMode);
static member SetPropertyAccessMode : Microsoft.EntityFrameworkCore.Metadata.IMutableModel * Nullable<Microsoft.EntityFrameworkCore.PropertyAccessMode> -> unit
<Extension()>
Public Sub SetPropertyAccessMode (model As IMutableModel, propertyAccessMode As Nullable(Of PropertyAccessMode))
參數
- model
- IMutableModel
要設定存取模式的型號。
- propertyAccessMode
- Nullable<PropertyAccessMode>
該 PropertyAccessMode,或 null 以清除模式設定。