EF: Dynamic SQL Problem in Stored Procedure (Entity Framework)

Posted on

If your Stored Procedure is using Dynamic sql as shown in following example, you would probably be getting int as the return type of your EF: Function for this SP

CREATE PROCEDURE [sp_test]
AS
BEGIN
DECLARE @SQL varchar(5000)
SET @SQL =  ' SELECT * FROM TableName';
EXEC (@SQL)

END

Work-Around:

Leave a Reply

Your email address will not be published. Required fields are marked *