MutableAnnotatableExtensions.GetOrAddAnnotation 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.
Gets the existing annotation with a given key, or adds a new annotation if one does not exist.
public static Microsoft.EntityFrameworkCore.Infrastructure.Annotation GetOrAddAnnotation (this Microsoft.EntityFrameworkCore.Metadata.IMutableAnnotatable annotatable, string annotationName, string value);
static member GetOrAddAnnotation : Microsoft.EntityFrameworkCore.Metadata.IMutableAnnotatable * string * string -> Microsoft.EntityFrameworkCore.Infrastructure.Annotation
<Extension()>
Public Function GetOrAddAnnotation (annotatable As IMutableAnnotatable, annotationName As String, value As String) As Annotation
Parameters
- annotatable
- IMutableAnnotatable
The object to find or add the annotation to.
- annotationName
- String
The key of the annotation to be found or added.
- value
- String
The value to be stored in the annotation if a new one is created.
Returns
The found or added 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