ConventionPropertyExtensions.SetValueGeneratorFactory(IConventionProperty, Func<IProperty,IEntityType,ValueGenerator>, Boolean) Yöntem

Tanım

Bu özellik için değer oluşturmak veya önceden ayarlanmış herhangi bir fabrikayı temizlemek null için kullanmak üzere fabrikayı ayarlar.

ayarı bu özellik için değer oluşturma özelliğini devre dışı bırakmaz, yalnızca bu özellik için açıkça yapılandırılmış null oluşturucuları temizler. Veritabanı sağlayıcısı, özellik türü için bir değer oluşturucuya sahip olabilir.

public static void SetValueGeneratorFactory (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, Func<Microsoft.EntityFrameworkCore.Metadata.IProperty,Microsoft.EntityFrameworkCore.Metadata.IEntityType,Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator> valueGeneratorFactory, bool fromDataAnnotation = false);
public static Func<Microsoft.EntityFrameworkCore.Metadata.IProperty,Microsoft.EntityFrameworkCore.Metadata.IEntityType,Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator> SetValueGeneratorFactory (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, Func<Microsoft.EntityFrameworkCore.Metadata.IProperty,Microsoft.EntityFrameworkCore.Metadata.IEntityType,Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator> valueGeneratorFactory, bool fromDataAnnotation = false);
static member SetValueGeneratorFactory : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * Func<Microsoft.EntityFrameworkCore.Metadata.IProperty, Microsoft.EntityFrameworkCore.Metadata.IEntityType, Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator> * bool -> unit
static member SetValueGeneratorFactory : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * Func<Microsoft.EntityFrameworkCore.Metadata.IProperty, Microsoft.EntityFrameworkCore.Metadata.IEntityType, Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator> * bool -> Func<Microsoft.EntityFrameworkCore.Metadata.IProperty, Microsoft.EntityFrameworkCore.Metadata.IEntityType, Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator>
<Extension()>
Public Sub SetValueGeneratorFactory (property As IConventionProperty, valueGeneratorFactory As Func(Of IProperty, IEntityType, ValueGenerator), Optional fromDataAnnotation As Boolean = false)
<Extension()>
Public Function SetValueGeneratorFactory (property As IConventionProperty, valueGeneratorFactory As Func(Of IProperty, IEntityType, ValueGenerator), Optional fromDataAnnotation As Boolean = false) As Func(Of IProperty, IEntityType, ValueGenerator)

Parametreler

property
IConventionProperty

için değer oluşturucu ayarlama özelliği.

valueGeneratorFactory
Func<IProperty,IEntityType,ValueGenerator>

Değer oluşturucu oluşturmak veya önceden ayarlanmış herhangi bir fabrikayı temizlemek null için kullanılacak bir fabrika.

fromDataAnnotation
Boolean

Yapılandırmanın veri ek açıklaması kullanılarak belirtilmemiş olup olmadığını gösterir.

Döndürülenler

Func<IProperty,IEntityType,ValueGenerator>

Yapılandırılan değer.

Şunlara uygulanır