ValueGeneratorCache.GetOrAdd(IProperty, IEntityType, Func<IProperty,IEntityType,ValueGenerator>) Yöntem

Tanım

Önbellekte mevcut değer oluşturucuyu alır veya bir önbellekte yoksa yeni bir tane oluşturur.

public virtual Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator GetOrAdd (Microsoft.EntityFrameworkCore.Metadata.IProperty property, Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType, Func<Microsoft.EntityFrameworkCore.Metadata.IProperty,Microsoft.EntityFrameworkCore.Metadata.IEntityType,Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator> factory);
abstract member GetOrAdd : Microsoft.EntityFrameworkCore.Metadata.IProperty * Microsoft.EntityFrameworkCore.Metadata.IEntityType * Func<Microsoft.EntityFrameworkCore.Metadata.IProperty, Microsoft.EntityFrameworkCore.Metadata.IEntityType, Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator> -> Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator
override this.GetOrAdd : Microsoft.EntityFrameworkCore.Metadata.IProperty * Microsoft.EntityFrameworkCore.Metadata.IEntityType * Func<Microsoft.EntityFrameworkCore.Metadata.IProperty, Microsoft.EntityFrameworkCore.Metadata.IEntityType, Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator> -> Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator
Public Overridable Function GetOrAdd (property As IProperty, entityType As IEntityType, factory As Func(Of IProperty, IEntityType, ValueGenerator)) As ValueGenerator

Parametreler

property
IProperty

İçin değer oluşturucunun alınacağı özellik.

entityType
IEntityType

Değer oluşturucusunun kullanacağı varlık türü. Türetilmiş varlık türlerinde devralınan özelliklerde çağrıldığında, bu varlık türü, üzerinde tanımlanan varlık türünden farklı olabilir property

factory
Func<IProperty,IEntityType,ValueGenerator>

Önbellekte yoksa, yeni bir değer Oluşturucu oluşturmak için fabrika.

Döndürülenler

ValueGenerator

Varolan veya yeni oluşturulan değer Oluşturucu.

Uygulamalar

Şunlara uygulanır