Bagikan melalui


ConventionTypeBaseExtensions.SetNavigationAccessMode Metode

Definisi

PropertyAccessMode Mengatur untuk digunakan untuk navigasi jenis entitas ini.

Perhatikan bahwa navigasi individual dapat mengambil alih mode akses ini. Nilai yang ditetapkan di sini akan digunakan untuk navigasi apa pun yang tidak ada penimpaan yang telah ditentukan.

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)

Parameter

entityType
IConventionTypeBase

Jenis untuk mengatur mode akses.

propertyAccessMode
Nullable<PropertyAccessMode>

PropertyAccessMode, atau null untuk menghapus set mode.

fromDataAnnotation
Boolean

Menunjukkan apakah konfigurasi ditentukan menggunakan anotasi data.

Mengembalikan

Nilai yang dikonfigurasi.

Berlaku untuk