Condividi tramite


IValueGeneratorSelector.TrySelect Method

Definition

Selects the appropriate value generator for a given property, if available.

public bool TrySelect (Microsoft.EntityFrameworkCore.Metadata.IProperty property, Microsoft.EntityFrameworkCore.Metadata.ITypeBase typeBase, out Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator? valueGenerator);
abstract member TrySelect : Microsoft.EntityFrameworkCore.Metadata.IProperty * Microsoft.EntityFrameworkCore.Metadata.ITypeBase * ValueGenerator -> bool
Public Function TrySelect (property As IProperty, typeBase As ITypeBase, ByRef valueGenerator As ValueGenerator) As Boolean

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

valueGenerator
ValueGenerator

The value generator, or null if none is available.

Returns

true if a value generator was selected; false if none was available.

Applies to