J'ai une procédure stockée qui renvoie des valeurs d'une table temporaire. Dans mon DBML, il affiche (Aucun) pour le type de retour. Quel est le truc pour l'obtenir pour reconnaître les colonnes de ma table temporaire?En utilisant LinqtoSql, comment puis-je retourner des valeurs d'une table temporaire dans un SPROC?
CREATE PROCEDURE [dbo].[GetCategoryPriceRanges]
@CategoryId int
AS
BEGIN
DECLARE @MinPrice money, @MaxPrice money
SELECT @MinPrice = MIN(ourPrice),@MaxPrice = MAX(ourPrice)
DECLARE @loopCatch int
--catch infinite loops
SELECT @loopCatch = 1
WHILE @thisLow <= @maxPrice AND @loopCatch < 100
BEGIN
INSERT INTO #prices(lowRange, hiRange) VALUES (@thisLow, @thisHigh)
SET @thisLow = @thisHigh + 1
SET @thisHigh = 2 * @thisLow - 1
SELECT @loopCatch = @loopCatch + 1
END
SELECT * FROM #prices
DROP TABLE #prices
END