IConventionAnnotatableBuilder.SetOrRemoveAnnotation 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.
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
Parameters
- 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.
Returns
An IConventionAnnotatableBuilder to continue configuration if the annotation was set or removed,
null
otherwise.
- Attributes
Applies to
Entity Framework