語言

IConventionPropertyBuilder.HasValueGenerator 方法

定義

多載

名稱 Description
HasValueGenerator(Func<IProperty,IEntityType,ValueGenerator>, Boolean)

設定 ValueGenerator 該屬性會產生該屬性的值。

HasValueGenerator(Func<IProperty,ITypeBase,ValueGenerator>, Boolean)

設定 ValueGenerator 該屬性會產生該屬性的值。

HasValueGenerator(Type, Boolean)

設定 ValueGenerator 該屬性會產生該屬性的值。

HasValueGenerator(Func<IProperty,IEntityType,ValueGenerator>, Boolean)

來源:
IConventionPropertyBuilder.cs

設定 ValueGenerator 該屬性會產生該屬性的值。

public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder HasValueGenerator(Func<Microsoft.EntityFrameworkCore.Metadata.IProperty,Microsoft.EntityFrameworkCore.Metadata.IEntityType,Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator> factory, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder? HasValueGenerator(Func<Microsoft.EntityFrameworkCore.Metadata.IProperty,Microsoft.EntityFrameworkCore.Metadata.IEntityType,Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator>? factory, bool fromDataAnnotation = false);
abstract member HasValueGenerator : Func<Microsoft.EntityFrameworkCore.Metadata.IProperty, Microsoft.EntityFrameworkCore.Metadata.IEntityType, Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder
Public Function HasValueGenerator (factory As Func(Of IProperty, IEntityType, ValueGenerator), Optional fromDataAnnotation As Boolean = false) As IConventionPropertyBuilder

參數

factory
Func<IProperty,IEntityType,ValueGenerator>

一個代表將被用來創建價值產生的實例。

fromDataAnnotation
Boolean

表示配置是否以資料註解方式指定。

傳回

如果設定是套用,則使用同一個建構者實例, null 否則。

適用於

HasValueGenerator(Func<IProperty,ITypeBase,ValueGenerator>, Boolean)

來源:
IConventionPropertyBuilder.cs
來源:
IConventionPropertyBuilder.cs
來源:
IConventionPropertyBuilder.cs
來源:
IConventionPropertyBuilder.cs

設定 ValueGenerator 該屬性會產生該屬性的值。

public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder? HasValueGenerator(Func<Microsoft.EntityFrameworkCore.Metadata.IProperty,Microsoft.EntityFrameworkCore.Metadata.ITypeBase,Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator>? factory, bool fromDataAnnotation = false);
abstract member HasValueGenerator : Func<Microsoft.EntityFrameworkCore.Metadata.IProperty, Microsoft.EntityFrameworkCore.Metadata.ITypeBase, Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder
Public Function HasValueGenerator (factory As Func(Of IProperty, ITypeBase, ValueGenerator), Optional fromDataAnnotation As Boolean = false) As IConventionPropertyBuilder

參數

factory
Func<IProperty,ITypeBase,ValueGenerator>

一個代表將被用來創建價值產生的實例。

fromDataAnnotation
Boolean

表示配置是否以資料註解方式指定。

傳回

如果設定是套用,則使用同一個建構者實例, null 否則。

適用於

HasValueGenerator(Type, Boolean)

來源:
IConventionPropertyBuilder.cs
來源:
IConventionPropertyBuilder.cs
來源:
IConventionPropertyBuilder.cs
來源:
IConventionPropertyBuilder.cs
來源:
IConventionPropertyBuilder.cs

設定 ValueGenerator 該屬性會產生該屬性的值。

public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder? HasValueGenerator(Type? valueGeneratorType, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder HasValueGenerator(Type valueGeneratorType, bool fromDataAnnotation = false);
abstract member HasValueGenerator : Type * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder
Public Function HasValueGenerator (valueGeneratorType As Type, Optional fromDataAnnotation As Boolean = false) As IConventionPropertyBuilder

參數

valueGeneratorType
Type

一種繼承自 ValueGenerator的類型。

fromDataAnnotation
Boolean

表示配置是否以資料註解方式指定。

傳回

如果設定是套用,則使用同一個建構者實例, null 否則。

適用於