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:
Code
CREATE PROCEDURE sp_calculatesalarybegin(@EmployeeId as int)Code
declare dynsql as varachar(500)SQL
@dynsql='Select @Salary=Salary,@UserName=Username from employee where EmployeeId='+cast(@EmployeeId as varchar)+ ''Code
exec(@dynsql)
Prakash Lakshmanan77 reputationPosted Dec 16, 2014, 2:10 AM EST
http://www.devtoolshed.com/using-stored-procedures-entity-framework-scalar-return-values
chaitanya varma5 reputationPosted Feb 14, 2018, 12:46 AM EST
Nitin SontakkeRank #264 · 9.6K reputationPosted Feb 24, 2018, 5:24 AM EST
Mukesh NayakRank #1,172 · 1.5K reputationPosted Feb 23, 2018, 11:42 PM EST