从实体框架中返回复杂类型

时间:2013-05-15 03:50:04

标签: asp.net entity-framework entity-framework-4

我有这样的存储过程:

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[CustOrderHist] @CustomerID nchar(5)
AS
SELECT ProductName, Total=SUM(Quantity)
FROM Products P, [Order Details] OD, Orders O, Customers C
WHERE C.CustomerID = @CustomerID
AND C.CustomerID = O.CustomerID AND O.OrderID = OD.OrderID AND OD.ProductID = P.ProductID
GROUP BY ProductName

我将此SP添加到我的实体模型中。这个SP不会返回任何数据库表,所以如何添加这个函数导入并填充我的gridview?请帮忙

0 个答案:

没有答案