IConventionModelBuilder.UsePropertyAccessMode(Nullable<PropertyAccessMode>, Boolean) Yöntem

Tanım

Bu varlık PropertyAccessMode türünün tüm özellikleri için kullanmak üzere ayarlar.

Varsayılan olarak, bir kural tarafından bulunursa veya belirtilmişse, genellikle varlıklar veritabanından sorgulanan yeni nesneler oluşturulurken backing alanı kullanılır. Özellikler diğer tüm erişimler için kullanılır. Bu yöntemin çağrılsı, enum'da açıklandığı gibi modelde tüm özellikler için bu PropertyAccessMode davranışı değiştirir.

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

Parametreler

propertyAccessMode
Nullable<PropertyAccessMode>

Bu PropertyAccessMode modelin özellikleri için kullanmak için .

fromDataAnnotation
Boolean

Yapılandırmanın veri ek açıklaması kullanılarak belirtilmemiş olup olmadığını gösterir.

Döndürülenler

IConventionModelBuilder

Yapılandırma başarılı olursa aynı oluşturucu null örneği, aksi takdirde.

Şunlara uygulanır