开发者

Invalid return type for a mapped stored procedure

开发者 https://www.devze.com 2023-04-07 09:12 出处:网络
Have a very large ASP.NET application I\'m creating Automated UI test cases for, part of the final part of this test case is to remove the user it just created (so we keep the same details every singl

Have a very large ASP.NET application I'm creating Automated UI test cases for, part of the final part of this test case is to remove the user it just created (so we keep the same details every single test run, and will expect the same results, no data will change.) and so I took to a stored procedure to do this.

The SP works fine in SQL, have tested it. Have now mapped it into LINQ2SQL. However when it is ran I get this:

System.InvalidOperationException: 'System.Void' is not a valid return type for a mapped stored开发者_JAVA技巧 procedure method.

The bottom line is that my SP doesn't have a return type, I don't want it to.


By default, the successful execution of a stored procedure will return the numeric value 0.

Can you change the return type for your LINQ2SQL mapping to int? If you don't care about the returned value, you can just ignore it.

0

精彩评论

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

关注公众号