IConventionAnnotatableBuilder.SetOrRemoveAnnotation 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.
Caution
Use HasNonNullAnnotation
Sets or removes the annotation stored under the given name.
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder SetOrRemoveAnnotation (string name, object value, bool fromDataAnnotation = false);
[System.Obsolete("Use HasNonNullAnnotation")]
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder SetOrRemoveAnnotation (string name, object value, bool fromDataAnnotation = false);
[System.Obsolete("Use HasNonNullAnnotation")]
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder? SetOrRemoveAnnotation (string name, object? value, bool fromDataAnnotation = false);
abstract member SetOrRemoveAnnotation : string * obj * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder
[<System.Obsolete("Use HasNonNullAnnotation")>]
abstract member SetOrRemoveAnnotation : string * obj * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder
override this.SetOrRemoveAnnotation : string * obj * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder
Public Function SetOrRemoveAnnotation (name As String, value As Object, Optional fromDataAnnotation As Boolean = false) As IConventionAnnotatableBuilder
Public Overridable Function SetOrRemoveAnnotation (name As String, value As Object, Optional fromDataAnnotation As Boolean = false) As IConventionAnnotatableBuilder
- name
- String
The name of the annotation to be set.
- value
- Object
The value to be stored in the annotation. null
to remove the annotations.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
An IConventionAnnotatableBuilder to continue configuration if the annotation was set or removed,
null
otherwise.
- Attributes
Product | Versions (Obsolete) |
---|---|
Entity Framework Core | 3.0, 3.1 (5.0, 6.0) |
Entity Framework feedback
Entity Framework is an open source project. Select a link to provide feedback: