I need to call SP from Entity Framework, with DB first approach. Below is the code for it. But i am facing error.
"The stored procedure or function 'XXXXXXX' does not have a return type. ExecuteFunction only supports stored procedures and functions that have a return type."
var searchFieldParameter = searchField != null ?
new ObjectParameter("SearchField", searchField) :
new ObjectParameter("SearchField", typeof(string));
var searchTextParameter = searchText != null ?
new ObjectParameter("SearchText", searchText) :
new ObjectParameter("SearchText", typeof(string));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<ReasonCode>("XXXXXXX", searchFieldParameter, searchTextParameter);