Please any one tell me how to discards the scalar value in stored procedure?
this is my SP
CREATE PROCEDURE testdata
AS
BEGIN
SET NOCOUNT ON;
SELECT c.CustomerName,c.CustomerCode, a.Address, a.Email,a.phone,a.ZipCode
from Customer c
join Address a on c.CustomerCode = a.CustomerCode
END
GO
This is my C# code
CustomerDataEntities enty = new CustomerDataEntities();
var productEntity = enty.testdata123();
// error foreach statement cannot operate on variables of type int
foreach (var prd in productEntity)
{
}
return Cus开发者_如何学PythontomerList;
Thanks.
Based just on what you're showing here, I'm assuming your stored procedure is set up as an imported function. I would guess that you are not mapping the results of this function to an entity type.
精彩评论