Freigeben über


ValueGeneratorSelector.TryCreate(IProperty, ITypeBase, ValueGenerator) Method

Definition

Creates a new value generator for the given property.

public virtual bool TryCreate (Microsoft.EntityFrameworkCore.Metadata.IProperty property, Microsoft.EntityFrameworkCore.Metadata.ITypeBase typeBase, out Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator? valueGenerator);
abstract member TryCreate : Microsoft.EntityFrameworkCore.Metadata.IProperty * Microsoft.EntityFrameworkCore.Metadata.ITypeBase * ValueGenerator -> bool
override this.TryCreate : Microsoft.EntityFrameworkCore.Metadata.IProperty * Microsoft.EntityFrameworkCore.Metadata.ITypeBase * ValueGenerator -> bool
Public Overridable Function TryCreate (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 newly created value generator, or null if none is available.

Returns

true if a generator was created.

Applies to