Entity Framework-No stored procedure columns returned |
|
My stored procedure returns temporary table with data. I am not able to import schema when importing stored procedure using entity framework and it returns "No Columns Returned".
|
RajKumar |
Answered# (13)
|
Reply For This Question
|
|
|
Answer(s) Posted
|
|
[Solved] Entity Framework - No stored procedure columns returned
|
|
Entity framework will not support importing stored procedure which is result set of "Dynamic Query" and "Temp Table".
In order to import the schema of the Stored procedure, entity framework need to execute the SP to yield the schema of the result set.
In this case, Using "SET FMTONLY OFF" will execute the stored procedure and get the column details with out execute the logic.
Usage:
Create Procedure SampleProcedure
AS
BEGIN
SET FMTONLY OFF
<<Your SP Logic>>
END
Note: After importing SP Schema successfully, use SET FMTONLY ON (or) Remove the SET FMTONLY OFF and execute the procedure to make it normal.
|
Raj Kumar
| Answered# (13)
|
|
|
Post Your Answer
|
Please login to post your answer.
|
|
|