I have a procedure in MS SQL Server and I am using LINQ to call it like this
var history = dataContext.GetHistory("EA434144-BA34-480B-8A06-65CC7D405111",
System.DateTime.ParseExact("2011-05-30", @"yyyy-MM-dd", null));
When I was adding the procedure to visual studio it was saying that the return value cannot be detected. When calling, it was giving me design time error: cannot assign void to an implicitly typed local variable
I tried to change the return value in visual studio and it can change it only to (None) but it lets me use the code now so it solves the "void" problem.
MS SQL Server Management Studio says that the return va开发者_JS百科lue is intiger and i get 0 when i call the procedure with LINQ and i dont know how to get to the data that i want. The result should be some list of double locations or NULL
(its not just some SELECT
query). When i call the procedure in management studio it shows the table with desired results but also again that the Return Value is 0.
Where is the problem? Is it some LINQ feature? How to get to my results?
So does the stored procedure return a result set, and a return value? and the return value is always 0? Is the problem not simply that the value being returned from the query is always the return value?
精彩评论