Share via


ExtensionMethods.SetAnnotationValue Method (IEdmModel, IEdmElement, String, String, Object)

Sets an annotation value for an EDM element. If the value is null, no annotation is added and an existing annotation with the same name is removed.

Namespace:  Microsoft.Data.Edm
Assembly:  Microsoft.Data.Edm (in Microsoft.Data.Edm.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Sub SetAnnotationValue ( _
    model As IEdmModel, _
    element As IEdmElement, _
    namespaceName As String, _
    localName As String, _
    value As Object _
)
'Usage
Dim model As IEdmModel 
Dim element As IEdmElement 
Dim namespaceName As String 
Dim localName As String 
Dim value As Object 

model.SetAnnotationValue(element, _
    namespaceName, localName, value)
public static void SetAnnotationValue(
    this IEdmModel model,
    IEdmElement element,
    string namespaceName,
    string localName,
    Object value
)
[ExtensionAttribute]
public:
static void SetAnnotationValue(
    IEdmModel^ model, 
    IEdmElement^ element, 
    String^ namespaceName, 
    String^ localName, 
    Object^ value
)
static member SetAnnotationValue : 
        model:IEdmModel * 
        element:IEdmElement * 
        namespaceName:string * 
        localName:string * 
        value:Object -> unit
public static function SetAnnotationValue(
    model : IEdmModel, 
    element : IEdmElement, 
    namespaceName : String, 
    localName : String, 
    value : Object
)

Parameters

  • namespaceName
    Type: System.String
    The namespace that the annotation belongs to.
  • localName
    Type: System.String
    The name of the annotation within the namespace.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEdmModel. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.103) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.103).

See Also

Reference

ExtensionMethods Class

SetAnnotationValue Overload

Microsoft.Data.Edm Namespace