In my model schema explorer I can see all the database sp's and udf's created. I can map them to a method and determine the return type. However one set of functions is not showing and that is the scalar-valued functions. I have tried several times to add them via the Update from Database wizard but they do not show in there? Articles like this (http://www.telerik.com/help/openaccess-orm/openaccess-tasks-model-tools-update-data-model-db-changes.html) and this (http://www.telerik.com/help/openaccess-orm/developer-guide-crud-sp-support-domain-method-db-functions.html) lead me to believe they should be added like any other function?
TIA
JB
5 Answers, 1 is accepted
The OpenAccess ORM schema reader does not retrieve information for the built-in database functions like SUM, MAX, etc. Only the user-defined scalar and table-valued functions are being fetched during the schema reading process.
Nevertheless you could use these functions by using the following approach:
Hope that helps. If any other questions arise, do not hesitate to contact us back.
Damyan Bogoev
the Telerik team
Please find the code snippet attached:
[MappedFunction(Name =
"UPPER"
, IsDeterministic =
false
, Backend = Telerik.OpenAccess.Metadata.Backend.MsSql)]
public
static
string
ToUpper(
string
arg)
{
throw
new
NotImplementedException();
}
Damyan Bogoev
the Telerik team
I am afraid I was unable to reproduce the wrong behavior on my side. The user-defined scalar-valued functions are being obtained during schema reading.
Could you please verify that the user, you are using during the schema reading session, has rights for reading these database objects? Additionally, I have to ask you to provide us with a database backup or ddl script in order to investigate the cause for the issue further?
I am looking forward to hearing from you.
Damyan Bogoev
the Telerik team
