NavigationBuilder<TSource,TTarget>.UsePropertyAccessMode(PropertyAccessMode) Yöntem

Tanım

PropertyAccessModeBu özellik için kullanılacak öğesini ayarlar.

Varsayılan olarak, bir kural tarafından bulunursa veya belirtilmişse, genellikle varlıklar veritabanından sorgulandığında, yeni nesneler oluşturulduğunda kullanılır. Özellikler diğer tüm erişimlerde kullanılır. Bu yöntemin çağrılması, bu özellik için sabit listesinde açıklanan davranışı değiştirecek PropertyAccessMode .

Bu yöntemin çağrılması, varlık türü veya modelinde ayarlanan herhangi bir erişim modu için bu özelliği geçersiz kılar.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.NavigationBuilder<TSource,TTarget> UsePropertyAccessMode (Microsoft.EntityFrameworkCore.PropertyAccessMode propertyAccessMode);
override this.UsePropertyAccessMode : Microsoft.EntityFrameworkCore.PropertyAccessMode -> Microsoft.EntityFrameworkCore.Metadata.Builders.NavigationBuilder<'Source, 'arget (requires 'Source : null and 'arget : null)>
Public Overridable Function UsePropertyAccessMode (propertyAccessMode As PropertyAccessMode) As NavigationBuilder(Of TSource, TTarget)

Parametreler

propertyAccessMode
PropertyAccessMode

PropertyAccessModeBu özellik için kullanılacak.

Döndürülenler

NavigationBuilder<TSource,TTarget>

Birden çok yapılandırma çağrısının zincirlenebilir olması için aynı Oluşturucu örneği.

Şunlara uygulanır