ConventionPropertyExtensions.SetValueGeneratorFactory Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Bu özellik için değer oluşturmak veya null
önceden ayarlanmış fabrikaları temizlemek için kullanılacak fabrikayı ayarlar.
Ayar null
bu özellik için değer oluşturmayı devre dışı bırakmaz, yalnızca bu özellik için açıkça yapılandırılan oluşturucuları temizler. Veritabanı sağlayıcısı yine de ö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
Değer oluşturucunun ayarlanacağı özellik.
- valueGeneratorFactory
- Func<IProperty,IEntityType,ValueGenerator>
Değer oluşturucu oluşturmak veya null
önceden ayarlanmış fabrikaları temizlemek için kullanılacak bir fabrika.
- fromDataAnnotation
- Boolean
Yapılandırmanın bir veri ek açıklaması kullanılarak belirtilip belirtilmediğinden emin olun.
Döndürülenler
Yapılandırılan değer.
Şunlara uygulanır
Entity Framework