I want to use LINQ to call stored procedure in this way but stored procedure I want to call contain SQL string that executed by
EXEC sp_executesql @strSQL
In this way Visual Studio does not generate result class. To resolve this problem I execute SQL string by
INSERT INTO @Temp EXEC sp_executesql @strSQL
SELECT * from @Temp
Maybe it is not the best way but it works. The problem is that it sometimes return items in wrong sequence. How to fix it?