IValueGeneratorCache.GetOrAdd Method

Definition

Overloads

GetOrAdd(IProperty, IEntityType, Func<IProperty,IEntityType,ValueGenerator>)

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

GetOrAdd(IProperty, ITypeBase, Func<IProperty,ITypeBase,ValueGenerator>)

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

GetOrAdd(IProperty, IEntityType, Func<IProperty,IEntityType,ValueGenerator>)

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

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

Parameters

property
IProperty

The property to get the value generator for.

entityType
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
Func<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.

Applies to

GetOrAdd(IProperty, ITypeBase, Func<IProperty,ITypeBase,ValueGenerator>)

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

public Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator GetOrAdd (Microsoft.EntityFrameworkCore.Metadata.IProperty property, Microsoft.EntityFrameworkCore.Metadata.ITypeBase typeBase, Func<Microsoft.EntityFrameworkCore.Metadata.IProperty,Microsoft.EntityFrameworkCore.Metadata.ITypeBase,Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator> factory);
abstract member GetOrAdd : Microsoft.EntityFrameworkCore.Metadata.IProperty * Microsoft.EntityFrameworkCore.Metadata.ITypeBase * Func<Microsoft.EntityFrameworkCore.Metadata.IProperty, Microsoft.EntityFrameworkCore.Metadata.ITypeBase, Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator> -> Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator
Public Function GetOrAdd (property As IProperty, typeBase As ITypeBase, factory As Func(Of IProperty, ITypeBase, ValueGenerator)) As ValueGenerator

Parameters

property
IProperty

The property to get the value generator for.

typeBase
ITypeBase

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
Func<IProperty,ITypeBase,ValueGenerator>

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

Returns

The existing or newly created value generator.

Applies to