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

Tanım

Önbellekten var olan değer oluşturucusünü alır veya önbellekte yoksa yeni bir tane oluşturur.

public 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
Public Function GetOrAdd (property As IProperty, entityType As IEntityType, factory As Func(Of IProperty, IEntityType, ValueGenerator)) As ValueGenerator

Parametreler

property
IProperty

için değer oluşturucusünü almak için özelliği.

entityType
IEntityType

Değer oluşturucu tarafından kullanılacak varlık türü. Türetilmiş varlık türlerinde devralınmış özelliklerde çağrıldıklarından, bu varlık türü, üzerinde bildirilen varlık türünden farklı olabilir property

factory
Func<IProperty,IEntityType,ValueGenerator>

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

Döndürülenler

ValueGenerator

Mevcut veya yeni oluşturulan değer oluşturucu.

Şunlara uygulanır