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 r
well, i think this is what you are looking for:
create procedure sp_calculatesalary
@employeeId int
as
declare @sql nvarchar(max);
@sql='select salary, username from employee
where employeeId=' + cast(@employeeId as nvarchar(10));
declare @t table (salary float, username varchar(50));
insert into @t exec(@sql);
select salary, username from @t;
return
this will generate a public partial class sp_calculatesalary_Result in entity framework based DAL.