IConventionProperty.SetValueGenerated Method
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.
Sets a value indicating when a value for this property will be generated by the database. Even when the property is set to be generated by the database, EF may still attempt to save a specific value (rather than having one generated by the database) when the entity is added and a value is assigned, or the property is marked as modified for an existing entity. See GetBeforeSaveBehavior() and GetAfterSaveBehavior() for more information and examples.
public void SetValueGenerated (Microsoft.EntityFrameworkCore.Metadata.ValueGenerated? valueGenerated, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.ValueGenerated? SetValueGenerated (Microsoft.EntityFrameworkCore.Metadata.ValueGenerated? valueGenerated, bool fromDataAnnotation = false);
abstract member SetValueGenerated : Nullable<Microsoft.EntityFrameworkCore.Metadata.ValueGenerated> * bool -> unit
abstract member SetValueGenerated : Nullable<Microsoft.EntityFrameworkCore.Metadata.ValueGenerated> * bool -> Nullable<Microsoft.EntityFrameworkCore.Metadata.ValueGenerated>
Public Sub SetValueGenerated (valueGenerated As Nullable(Of ValueGenerated), Optional fromDataAnnotation As Boolean = false)
Public Function SetValueGenerated (valueGenerated As Nullable(Of ValueGenerated), Optional fromDataAnnotation As Boolean = false) As Nullable(Of ValueGenerated)
- valueGenerated
- Nullable<ValueGenerated>
A value indicating when a value for this property will be generated by the database.
null
to reset to default.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
The configured value.
Proizvod | Verzije |
---|---|
Entity Framework Core | 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0 |
Povratne informacije o proizvodu Entity Framework
Entity Framework je projekt otvorenog koda. Odaberite vezu za slanje povratnih informacija: