AnnotatableBuilder<TMetadata,TModelBuilder>.HasNonNullAnnotation 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.
Overwrites the existing annotation if an annotation with the specified name already exists.
Removes the annotation if null
value is specified.
public virtual Microsoft.EntityFrameworkCore.Infrastructure.AnnotatableBuilder<TMetadata,TModelBuilder> HasNonNullAnnotation (string name, object value, Microsoft.EntityFrameworkCore.Metadata.ConfigurationSource configurationSource);
public virtual Microsoft.EntityFrameworkCore.Infrastructure.AnnotatableBuilder<TMetadata,TModelBuilder>? HasNonNullAnnotation (string name, object? value, Microsoft.EntityFrameworkCore.Metadata.ConfigurationSource configurationSource);
abstract member HasNonNullAnnotation : string * obj * Microsoft.EntityFrameworkCore.Metadata.ConfigurationSource -> Microsoft.EntityFrameworkCore.Infrastructure.AnnotatableBuilder<'Metadata, 'ModelBuilder (requires 'Metadata :> Microsoft.EntityFrameworkCore.Infrastructure.ConventionAnnotatable and 'ModelBuilder :> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder)>
override this.HasNonNullAnnotation : string * obj * Microsoft.EntityFrameworkCore.Metadata.ConfigurationSource -> Microsoft.EntityFrameworkCore.Infrastructure.AnnotatableBuilder<'Metadata, 'ModelBuilder (requires 'Metadata :> Microsoft.EntityFrameworkCore.Infrastructure.ConventionAnnotatable and 'ModelBuilder :> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder)>
Public Overridable Function HasNonNullAnnotation (name As String, value As Object, configurationSource As ConfigurationSource) As AnnotatableBuilder(Of TMetadata, TModelBuilder)
Parameters
- name
- String
The key of the annotation to be set.
- value
- Object
The value to be stored in the annotation.
- configurationSource
- ConfigurationSource
The configuration source of the annotation to be set.
Returns
The same builder so that multiple calls can be chained.
Applies to
Entity Framework