开发者

how to discards the scalar value in stored procedure?

开发者 https://www.devze.com 2023-04-12 09:32 出处:网络
Please any one tell me how to discards the scalar value in stored procedure? this is my SP CREATE PROCEDURE testdata

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消