Hello
We haven't been able to understand how you should call stored procedures or functions that return scalar values with Enttity Framework.
Whe have checked the article http://www.devart.com/blogs/dotconnect/?p=5 but it refers to stored procedures returning cursors not string (for example)
Can you help us by telling us which are the necesary steps to accomplish that?
Thanks
Stored procedures and functions with EF
If a stored procedure returns scalar value, it is necessary to adjust the settings of the method in Method Editor of Devart Entity Developer. Assuming your stored procedure looks like
Return Type in Method Editor should be set to None, and make sure that the Direction property of out parameter is set to Output in the Parameters tab. Save the model. You can call this method from your code now:
If you encounter any difficulties, please specify the exact error message and the steps we should follow to reproduce it in our environment.
Code: Select all
CREATE or REPLACE PROCEDURE GET_STRING(strParam OUT Varchar)
IS
BEGIN
select 'Hello!' into strparam from dual;
END;
Code: Select all
string tmp = null;
using (DataSourceModel1.DataSourceModel1Entities context = new DataSourceModel1.DataSourceModel1Entities()){
context.Get_String(ref tmp);
}