internal static void ConvertCustomAnnotations(MetadataProviderEdmModel model, IEnumerable <KeyValuePair <string, object> > customAnnotations, IEdmElement target)
 {
     foreach (IEdmDirectValueAnnotation annotation in ConvertCustomAnnotations(model, customAnnotations))
     {
         model.SetAnnotationValue(target, annotation.NamespaceUri, annotation.Name, annotation.Value);
     }
 }
        internal static void ConvertEntityPropertyMappings(MetadataProviderEdmModel model, ResourceType resourceType, EdmEntityType entityType)
        {
            IEnumerable <EntityPropertyMappingAttribute> allEpmInfo = resourceType.AllEpmInfo;

            if (allEpmInfo != null)
            {
                ODataEntityPropertyMappingCollection mappings = new ODataEntityPropertyMappingCollection();
                foreach (EntityPropertyMappingAttribute attribute in allEpmInfo)
                {
                    mappings.Add(attribute);
                }
                model.SetAnnotationValue <ODataEntityPropertyMappingCollection>(entityType, mappings);
            }
        }