I have a stored procedure that executes some dynamic SQL. I want to use this stored procedure in entity infrastructure 4, but when I try to create a complex type, the procedure does not return columns. Is there any way to make it return my values ββand get the entity infrastructure to receive them? Here is a very simplified example of what I want to do:
CREATE PROCEDURE sp_calculatesalary(@EmployeeId as int) begin declare dynsql as varachar(500) @dynsql='Select @Salary=Salary,@UserName=Username from employee where EmployeeId='+cast(@EmployeeId as varchar)+ '' exec(@dynsql) select @Salary, @UserName end
But that does not work. Please help me. Basically, I want to use a stored procedure to execute dynamic SQL and return the values ββto the entity infrastructure.
sql-server-2008 stored-procedures return-value entity-framework-4
Vishal Jul 02 2018-10-02T00: 00Z
source share