Hi,
im trying to set data from my project (mvc.net,c#) by web service and im using a store Procedure to set the data.
after setting i should recive an int id of the record that was created.
my problem is that the SP returns an objectResult when i run it from my project but when i execute it in SQL it returns int...
How to retrieve an int from Stored Procedure using EF ???
Thanks @Vikas!
your second option worked for me:
A possible solution to your question can be as it appears that Entity Framework gets confused as to what should be returned by the procedure. The solution I've come across is to add this at the top of the sproc:
SET FMTONLY OFF
It may resolve your issue.
Another possible solution can be:
Check Link for Details
Subscribe to our weekly Newsletter & Keep getting latest article/questions in your inbox weekly