ValueGeneratorSelector.Create Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Create(IProperty, IEntityType) |
Creates a new value generator for the given property. |
Create(IProperty, ITypeBase) |
Obsolete.
Creates a new value generator for the given property. |
Create(IProperty, IEntityType)
- Source:
- ValueGeneratorSelector.cs
- Source:
- ValueGeneratorSelector.cs
- Source:
- ValueGeneratorSelector.cs
- Source:
- ValueGeneratorSelector.cs
- Source:
- ValueGeneratorSelector.cs
- Source:
- ValueGeneratorSelector.cs
- Source:
- ValueGeneratorSelector.cs
Creates a new value generator for the given property.
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
Parameters
- property
- IProperty
The property to get the value generator for.
- entityType
- IEntityType
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
Returns
The newly created value generator.
Applies to
Create(IProperty, ITypeBase)
- Source:
- ValueGeneratorSelector.cs
- Source:
- ValueGeneratorSelector.cs
Caution
Use TryCreate and throw if needed when the generator is not found.
Creates a new value generator for the given property.
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.")]
public virtual Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator Create (Microsoft.EntityFrameworkCore.Metadata.IProperty property, Microsoft.EntityFrameworkCore.Metadata.ITypeBase typeBase);
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
[<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
Public Overridable Function Create (property As IProperty, typeBase As ITypeBase) As ValueGenerator
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
Returns
The newly created value generator.
- Attributes
Applies to
Entity Framework