Invalid return type for displayed stored procedure

I have a very large ASP.NET application. I am creating test cases with an automated user interface. Part of the final part of this test case is to delete the user that he just created (so we keep the same data every single test run, and expect the same results, no data will change.), And so I did to save the stored procedure.

SP works fine in SQL, tested it. Now mapped it to LINQ2SQL. However, when it starts, I get the following:

System.InvalidOperationException: "System.Void" is not a valid return type for the associated stored procedure method.

The bottom line is that my SP does not have a return type, I do not want it.

+8
c # stored-procedures linq-to-sql
source share
1 answer

By default, successful execution of the stored procedure returns a numerical value of 0.

Can you change the return type to map LINQ2SQL to int ? If you don't care about the return value, you can simply ignore it.

+13
source share

All Articles