Share via


ValueGeneratorCache.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>)

Source:
ValueGeneratorCache.cs
Source:
ValueGeneratorCache.cs
Source:
ValueGeneratorCache.cs
Source:
ValueGeneratorCache.cs
Source:
ValueGeneratorCache.cs
Source:
ValueGeneratorCache.cs
Source:
ValueGeneratorCache.cs

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

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

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.

Implements

Applies to

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

Source:
ValueGeneratorCache.cs
Source:
ValueGeneratorCache.cs

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

public virtual 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);
public virtual 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
override this.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 Overridable 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.

Implements

Applies to