Bagikan melalui


ConventionTypeBaseExtensions.SetPropertyAccessMode Metode

Definisi

Menyetel yang PropertyAccessMode akan digunakan untuk properti tipe ini.

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

public static void SetPropertyAccessMode (this Microsoft.EntityFrameworkCore.Metadata.IConventionTypeBase entityType, Microsoft.EntityFrameworkCore.PropertyAccessMode? propertyAccessMode, bool fromDataAnnotation = false);
public static Microsoft.EntityFrameworkCore.PropertyAccessMode? SetPropertyAccessMode (this Microsoft.EntityFrameworkCore.Metadata.IConventionTypeBase entityType, Microsoft.EntityFrameworkCore.PropertyAccessMode? propertyAccessMode, bool fromDataAnnotation = false);
static member SetPropertyAccessMode : Microsoft.EntityFrameworkCore.Metadata.IConventionTypeBase * Nullable<Microsoft.EntityFrameworkCore.PropertyAccessMode> * bool -> unit
static member SetPropertyAccessMode : Microsoft.EntityFrameworkCore.Metadata.IConventionTypeBase * Nullable<Microsoft.EntityFrameworkCore.PropertyAccessMode> * bool -> Nullable<Microsoft.EntityFrameworkCore.PropertyAccessMode>
<Extension()>
Public Sub SetPropertyAccessMode (entityType As IConventionTypeBase, propertyAccessMode As Nullable(Of PropertyAccessMode), Optional fromDataAnnotation As Boolean = false)
<Extension()>
Public Function SetPropertyAccessMode (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