ValueGeneratorCache.GetOrAdd(IProperty, IEntityType, Func<IProperty, IEntityType, ValueGenerator>) ValueGeneratorCache.GetOrAdd(IProperty, IEntityType, Func<IProperty, IEntityType, ValueGenerator>) Method

Definition

Gets the existing value generator from the cache, or creates a new one if one is not present in the cache.

public virtual ValueGenerator GetOrAdd(IProperty property, IEntityType entityType, Func<IProperty, IEntityType, ValueGenerator> factory)
Public Overridable Function GetOrAdd(property As IProperty, entityType As IEntityType, factory As Func(Of IProperty, IEntityType, ValueGenerator)) As ValueGenerator

Parameters

property
IProperty IProperty

The property to get the value generator for.

entityType
IEntityType IEntityType

The entity type that the value generator will be used for. When called on inherited properties on derived entity types, this entity type may be different from the declared entity type on property

factory
System.Func<IProperty, IEntityType, ValueGenerator> System.Func(Of IProperty, IEntityType, ValueGenerator)

Factory to create a new value generator if one is not present in the cache.

Returns

The existing or newly created value generator.

Implements