Hi all,
i am using entity frame work for model in the data Access layer.
I have a Stored Procedure which executes some dynamic SQL. I want to use this Stored Procedure in entity framework 4, but when I try to create a complex type the procedure returns no columns. Is there any way I can force it to return my values and get the entity framework to receive them? Here is a much-simplified example of what I want to do:
CREATE PROCEDURE sp_calculatesalary
begin(@EmployeeId as int)
declare dynsql as varachar(500)
@dynsql='Select @Salary=Salary,@UserName=Username from employee where EmployeeId='+cast(@EmployeeId as varchar)+ ''
exec(@dynsql)
end