public static Type GetClrType(this IEdmModel edmModel, IEdmType edmType)
        {
            if (edmType.TypeKind == EdmTypeKind.Primitive)
            {
                return(PrimitiveTypeHelper.GetClrType((edmType as IEdmPrimitiveType).PrimitiveKind));
            }

            OeValueAnnotation <Type> clrTypeAnnotation = edmModel.GetAnnotationValue <OeValueAnnotation <Type> >(edmType);

            if (clrTypeAnnotation != null)
            {
                return(clrTypeAnnotation.Value);
            }

            if (edmType.TypeKind == EdmTypeKind.Collection)
            {
                return(edmModel.GetClrType((edmType as IEdmCollectionType).ElementType.Definition));
            }

            throw new InvalidOperationException("Add OeClrTypeAnnotation for " + edmType.FullTypeName());
        }
        public static bool IsDbFunction(this IEdmModel edmModel, IEdmOperation edmOperation)
        {
            OeValueAnnotation <bool> valueAnnotation = edmModel.GetAnnotationValue <OeValueAnnotation <bool> >(edmOperation);

            return(valueAnnotation.Value);
        }