diff --git a/src/Microsoft.OData.Edm/ExtensionMethods/ExtensionMethods.cs b/src/Microsoft.OData.Edm/ExtensionMethods/ExtensionMethods.cs index e2fde78b99..812b79ba7b 100644 --- a/src/Microsoft.OData.Edm/ExtensionMethods/ExtensionMethods.cs +++ b/src/Microsoft.OData.Edm/ExtensionMethods/ExtensionMethods.cs @@ -2027,6 +2027,18 @@ public static void AddAlternateKeyAnnotation(this EdmModel model, IEdmEntityType model.SetVocabularyAnnotation(annotation); } + /// + /// Adds a vocabulary annotation to this model. + /// + /// The model the annotation is added to. + /// The annotation to be added. + /// The location to add the allocation + public static void AddVocabularyAnnotation(this EdmModel model, IEdmVocabularyAnnotation annotation, Csdl.EdmVocabularyAnnotationSerializationLocation location) + { + model.AddVocabularyAnnotation(annotation); + annotation.SetSerializationLocation(model, location); + } + /// /// Checks whether the given entity type has the as one of the key properties. ///