ConventionTypeBaseExtensions.SetNavigationAccessMode 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
PropertyAccessMode設定要用於此實體型別導覽的 。
請注意,個別導覽可以覆寫此存取模式。 此處設定的值將用於未指定覆寫的任何流覽。
public static void SetNavigationAccessMode (this Microsoft.EntityFrameworkCore.Metadata.IConventionTypeBase entityType, Microsoft.EntityFrameworkCore.PropertyAccessMode? propertyAccessMode, bool fromDataAnnotation = false);
public static Microsoft.EntityFrameworkCore.PropertyAccessMode? SetNavigationAccessMode (this Microsoft.EntityFrameworkCore.Metadata.IConventionTypeBase entityType, Microsoft.EntityFrameworkCore.PropertyAccessMode? propertyAccessMode, bool fromDataAnnotation = false);
static member SetNavigationAccessMode : Microsoft.EntityFrameworkCore.Metadata.IConventionTypeBase * Nullable<Microsoft.EntityFrameworkCore.PropertyAccessMode> * bool -> unit
static member SetNavigationAccessMode : Microsoft.EntityFrameworkCore.Metadata.IConventionTypeBase * Nullable<Microsoft.EntityFrameworkCore.PropertyAccessMode> * bool -> Nullable<Microsoft.EntityFrameworkCore.PropertyAccessMode>
<Extension()>
Public Sub SetNavigationAccessMode (entityType As IConventionTypeBase, propertyAccessMode As Nullable(Of PropertyAccessMode), Optional fromDataAnnotation As Boolean = false)
<Extension()>
Public Function SetNavigationAccessMode (entityType As IConventionTypeBase, propertyAccessMode As Nullable(Of PropertyAccessMode), Optional fromDataAnnotation As Boolean = false) As Nullable(Of PropertyAccessMode)
參數
- entityType
- IConventionTypeBase
要設定存取模式的型別。
- propertyAccessMode
- Nullable<PropertyAccessMode>
要 PropertyAccessMode 清除模式集的 、 或 null
。
- fromDataAnnotation
- Boolean
指出是否已使用資料批註指定組態。
傳回
已設定的值。