You can define a custom function in the storage model by adding a
Function element that contains a CommandText element to the storage
schema definition language (SSDL) of an .edmx file. A CommandText
element is commonly used to provide functionality similar to that
provided by stored procedures, but the stored procedure is defined in
the .edmx file, not the database.
a) Does custom function simply send native query command ( this command is specified within CommandText element ) to the DB, or does it send a CREATE PROCEDURE command to the DB ( thus stored procedure created in a DB then contains a command specified within CommandText element ), and then in turn calls this DB’s stored procedure?
b) What exactly is meant by “the store procedure is defined in the edmx file, not the database”? Perhaps that edmx file contains a blueprint from which it will create appropriate store procedure in the DB?
Thank you
The phrase “the store procedure is defined in the edmx file, not the database” is proceeded with ‘similar to that provided by stored procedures’
So if you would create a stored procedure in your database and import it in the CSDL or create a custom function and import it in the CSDL, it won’t make a difference for your CSDL.
But if you run SQL Profiler you will see that the CommandText is executed als regular Sql, not as a stored procedure.