Bagikan melalui


IConventionServicePropertyBuilder.UsePropertyAccessMode Metode

Definisi

Menyetel yang PropertyAccessMode akan digunakan untuk properti ini.

public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionServicePropertyBuilder UsePropertyAccessMode (Microsoft.EntityFrameworkCore.PropertyAccessMode? propertyAccessMode, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionServicePropertyBuilder? UsePropertyAccessMode (Microsoft.EntityFrameworkCore.PropertyAccessMode? propertyAccessMode, bool fromDataAnnotation = false);
abstract member UsePropertyAccessMode : Nullable<Microsoft.EntityFrameworkCore.PropertyAccessMode> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionServicePropertyBuilder
Public Function UsePropertyAccessMode (propertyAccessMode As Nullable(Of PropertyAccessMode), Optional fromDataAnnotation As Boolean = false) As IConventionServicePropertyBuilder

Parameter

propertyAccessMode
Nullable<PropertyAccessMode>

yang PropertyAccessMode akan digunakan untuk properti ini.

fromDataAnnotation
Boolean

Menunjukkan apakah konfigurasi ditentukan menggunakan anotasi data.

Mengembalikan

Instans penyusun yang sama jika konfigurasi diterapkan, null jika tidak.

Berlaku untuk