c# - LINQ to SQL stored procedures with multiple results in Visual Studio 2008 -


I am using Visual Studio 2008 and I have created a stored procedure that selects two different result sets is. I drag the stored proc to a linq on the sql dbml datacontext class, so that the visual studio can be made the following code in the CS file: [Function (name = "dbo.List_MultiSelect")] Public IsingleResult & lt; DataAccessLayer.DataEntities.List_MultiSelectResult & gt; Select List_Multi () {IExecuteResult Results = this.ExecuteMethodCall (this, (MethodInfo) (MethodInfo.GetCurrentMethod ()))); Return ((IslingelSalt & lt; DataAccessless.DataIntees. Select Listslitti & gt;) (Results Returning)); }

Should not the designer generate the code to use IMultipleResults? Or do I have to hand over that code?

Using a ISingleResult using the designer you expect when using SqlMetal That will generate IMultipleResult otherwise, yes, you have to jump in it and trigger it directly.

There will be an easy way to use SQLMetal, which will generate the code. Keep in mind that pasting in designer code is not ideal because code generation will overwrite it. Perhaps you can take the relevant code into partial orbit to avoid this problem.

My detailed answer here addresses this issue:


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -