語言

ValueGeneratorSelector.Create 方法

定義

多載

名稱 Description
Create(IProperty, IEntityType)

為給定屬性建立新的值產生器。

Create(IProperty, ITypeBase)
已淘汰.

為給定屬性建立新的值產生器。

Create(IProperty, IEntityType)

來源:
ValueGeneratorSelector.cs
來源:
ValueGeneratorSelector.cs
來源:
ValueGeneratorSelector.cs
來源:
ValueGeneratorSelector.cs
來源:
ValueGeneratorSelector.cs
來源:
ValueGeneratorSelector.cs
來源:
ValueGeneratorSelector.cs

為給定屬性建立新的值產生器。

public virtual Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator Create(Microsoft.EntityFrameworkCore.Metadata.IProperty property, Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType);
abstract member Create : Microsoft.EntityFrameworkCore.Metadata.IProperty * Microsoft.EntityFrameworkCore.Metadata.IEntityType -> Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator
override this.Create : Microsoft.EntityFrameworkCore.Metadata.IProperty * Microsoft.EntityFrameworkCore.Metadata.IEntityType -> Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator
Public Overridable Function Create (property As IProperty, entityType As IEntityType) As ValueGenerator

參數

property
IProperty

取得值產生器的屬性。

entityType
IEntityType

價值產生器將用於的實體類型。 當在衍生實體類型的繼承屬性上呼叫時,該實體類型可能與宣告的實體類型不同 property

傳回

新創造的價值生成器。

適用於

Create(IProperty, ITypeBase)

來源:
ValueGeneratorSelector.cs
來源:
ValueGeneratorSelector.cs
來源:
ValueGeneratorSelector.cs

警告

Use TryCreate and throw if needed when the generator is not found.

為給定屬性建立新的值產生器。

[System.Obsolete("Use TryCreate and throw if needed when the generator is not found.")]
public virtual Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator Create(Microsoft.EntityFrameworkCore.Metadata.IProperty property, Microsoft.EntityFrameworkCore.Metadata.ITypeBase typeBase);
public virtual Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator Create(Microsoft.EntityFrameworkCore.Metadata.IProperty property, Microsoft.EntityFrameworkCore.Metadata.ITypeBase typeBase);
[<System.Obsolete("Use TryCreate and throw if needed when the generator is not found.")>]
abstract member Create : Microsoft.EntityFrameworkCore.Metadata.IProperty * Microsoft.EntityFrameworkCore.Metadata.ITypeBase -> Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator
override this.Create : Microsoft.EntityFrameworkCore.Metadata.IProperty * Microsoft.EntityFrameworkCore.Metadata.ITypeBase -> Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator
abstract member Create : Microsoft.EntityFrameworkCore.Metadata.IProperty * Microsoft.EntityFrameworkCore.Metadata.ITypeBase -> Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator
override this.Create : Microsoft.EntityFrameworkCore.Metadata.IProperty * Microsoft.EntityFrameworkCore.Metadata.ITypeBase -> Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator
Public Overridable Function Create (property As IProperty, typeBase As ITypeBase) As ValueGenerator

參數

property
IProperty

取得值產生器的屬性。

typeBase
ITypeBase

價值產生器將用於的實體類型。 當在衍生實體類型的繼承屬性上呼叫時,該實體類型可能與宣告的實體類型不同 property

傳回

新創造的價值生成器。

屬性

適用於