After I went through OData doc, I still do not understand the meaning of <FunctionImport>
.
But I think above requirement can be achieved by general <Function>
also, right?
<FunctionImport>
and <Function>
exactly?I do appreciate anyone's help! Thanks
There are three types of functions in OData:
GET http://host/service/Products(1)/Namespace.GetCategories()
such function is defined in the metadata using the <function>
element and with its isBound
attribute set to true
.
GET http://host/service/Products?$filter(Name eq Namespace.GetTheLongestProductName())
such function is defined in the metadata using the <function>
element with its isBound
attribute set to false
GET http://host/service/GetMostExpensiveProduct()
Their concept is a little bit similar as the concept of static functions in program languages, and they are defined in metadata using the <functionimport>
element.Similar distinguishing applies to <action>
and <actionimport>
as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With