ConventionAnnotatable.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.
Sets the annotation with given key and value on this object using given configuration source.
Removes the existing annotation if an annotation with the specified name already exists and
value
is null
.
public virtual Microsoft.EntityFrameworkCore.Metadata.Internal.ConventionAnnotation? SetOrRemoveAnnotation (string name, object? value, Microsoft.EntityFrameworkCore.Metadata.ConfigurationSource configurationSource);
abstract member SetOrRemoveAnnotation : string * obj * Microsoft.EntityFrameworkCore.Metadata.ConfigurationSource -> Microsoft.EntityFrameworkCore.Metadata.Internal.ConventionAnnotation
override this.SetOrRemoveAnnotation : string * obj * Microsoft.EntityFrameworkCore.Metadata.ConfigurationSource -> Microsoft.EntityFrameworkCore.Metadata.Internal.ConventionAnnotation
Public Overridable Function SetOrRemoveAnnotation (name As String, value As Object, configurationSource As ConfigurationSource) As ConventionAnnotation
Parameters
- name
- String
The key of the annotation to be added.
- value
- Object
The value to be stored in the annotation.
- configurationSource
- ConfigurationSource
The configuration source of the annotation to be set.
Returns
Microsoft.EntityFrameworkCore.Metadata.Internal.ConventionAnnotation
The new annotation.
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Entity Framework