LINQ to SQL auto-generated type for stored procedure

Posted by StuffHappens on Stack Overflow See other posts from Stack Overflow or by StuffHappens
Published on 2010-06-08T13:13:09Z Indexed on 2010/06/08 13:22 UTC
Read the original article Hit count: 169

Hello.
I have the following stored procedure

ALTER PROCEDURE [dbo].Test
AS
BEGIN
    CREATE TABLE ##table
    (
        ID1 int,
        ID2 int
    )

    DECLARE @query varchar(MAX);

    INSERT INTO ##table VALUES(1, 1);

    SELECT * FROM ##table;
END

And I try to use it from C# code. I use LINQ to SQL as an O/RM. When I add the procedure to DataBaseContext it says that it can't figure out the return value of this procedure. How to modify the stored procedure so that I can use it with LINQ to SQL.

Note: I need to have global template table!

© Stack Overflow or respective owner

Related posts about c#

Related posts about sql-server-2005