一個存儲過程,我似乎不能,因爲我得到這個錯誤讀取到這個實體框架和使用LINQ:我如何使用,使用表與實體框架
The return types for the following stored procedures could not be detected. Set the return type for each stored procedure in the Properties window.
我試着用搜索引擎,但解決方案似乎從我的頭腦中走出來..任何方式我可以解決這個問題?絕望= [
我能想到使這項工作的唯一方法是創建一個新的表..但我只能用存儲過程不幸
ALTER PROCEDURE [dbo].[GetGame_FantasyHome]
-- Add the parameters for the stored procedure here
@GameDate varchar(8),
@TricodeHome varchar(3)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
CREATE TABLE #FantasyHome(
GameKey int,
PlayerName varchar(50),
Tricode varchar(3),
StatString varchar(50),
Position varchar(20),
FantasyScore int
)
DECLARE @gameKey int
SET @gameKey = (SELECT GameKey FROM Games WHERE [email protected]
AND [email protected])
INSERT #FantasyHome
SELECT TOP 1 p.GameKey, p.PlayerName, p.Tricode, p.StatString, p.Position,
(p.Yards/25 + p.Touchdowns * 6 - p.Interceptions * 2) AS FantasyScore
FROM GamePassers AS p
WHERE [email protected] AND [email protected]
ORDER BY FantasyScore DESC, p.Yards DESC
SELECT *
FROM #FantasyHome
ORDER BY FantasyScore DESC
DROP TABLE #FantasyHome
END
謝謝你將會看到這個 – user1189352
你是男人!把它變成表變量,它的工作!你認真地認真地爲我節省了數小時的工作時間,試圖找到一個解決方案 – user1189352
下次記得開始尋找一個解決方案,通過搜索錯誤信息或只是其中的一部分,並檢查結果。 ;) –