When a stored procedure has multiple result sets with the same column signature, only the first rowset with the given signature is included in the generated DBML.
Consider the following three stored procedures:
CREATE PROCEDURE [GetOneWithLetters]
SELECT 1 as [One], [Letter] FROM [dbo].[Letters]
CREATE PROCEDURE [GetTwoWithLetters]
SELECT 2 as [Two], [Letter] FROM [dbo].[Letters]
CREATE PROCEDURE [BrokenInSqlMetal]
The first two stored procedures return simple result sets. The third stored procedure returns two result sets by calling first two procedures.
Note that although the [BrokenInSqlMetal] procedure returns two result sets, only one result is generated. When the stored procedure is executed via a LINQ to SQL DataContext, and reults are retrieved by calling DataContext.GetResult two times, the contents of the second result set are incorrect. The value of the One property (which should correspond to the [Two] column of the second stored proc) is not populated.
One fix is to swap the position of the columns in one of the rowsets. It also appears that adding a column alias to one of the child procedures will resolve the problem. Of course, this will likely require modifying the calling code at some layer of your application.
I have posted this issue to Microsoft Connect. If it affects you, please visit and vote here.