SQL Guru
asked on
Entity Framework doesn't recognise datatype
I have two temp tables, storing the output results from two different sp's.Finally I union two temp table and shows the final output.
But when i called it from Entity framework, it doesn't returns the table instead it's return int. What is happening here.
If i use the data contract , then its work. I have a solution but i like to know is there any other method to fix it apart introducing the faux data contract for the result set.What is the root cause behind this.I want to fix this issue from EF and not to provide the workareound solution.
Link helped me fixed the issue :
https://jacstech.wordpress.com/2013/09/27/getting-entity-framework-to-recognise-the-return-type-of-a-stored-procedure-that-returns-a-temp-table/
But when i called it from Entity framework, it doesn't returns the table instead it's return int. What is happening here.
If i use the data contract , then its work. I have a solution but i like to know is there any other method to fix it apart introducing the faux data contract for the result set.What is the root cause behind this.I want to fix this issue from EF and not to provide the workareound solution.
Link helped me fixed the issue :
https://jacstech.wordpress.com/2013/09/27/getting-entity-framework-to-recognise-the-return-type-of-a-stored-procedure-that-returns-a-temp-table/
ASKER
My concerns, why does Entity Framework doesn't take the datatype by default?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
import the procedure EF must execute it, executing them may effect you database as they may be doing some changes.
What changes does it do? How does will it impact the database?
What changes does it do? How does will it impact the database?
Whatever changes you have coded in your stored proc.
Open in new window
in you stored proc then retry adding in entity frameowork.Per MSDN