Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 1.58 KB

how-to-use-stored-procedures-mapped-for-sequential-result-shapes.md

File metadata and controls

37 lines (27 loc) · 1.58 KB
description title ms.date dev_langs ms.assetid
Learn more about: How to: Use Stored Procedures Mapped for Sequential Result Shapes
How to: Use Stored Procedures Mapped for Sequential Result Shapes
03/30/2017
csharp
vb
a73530de-5a4e-4d9c-8d66-abb19c225b11

How to: Use Stored Procedures Mapped for Sequential Result Shapes

This kind of stored procedure can generate more than one result shape, but you know in what order the results are returned. Contrast this scenario with the scenario where you do not know the sequence of the returns. For more information, see How to: Use Stored Procedures Mapped for Multiple Result Shapes.

Example 1

Here is the T-SQL of a stored procedure that returns multiple result shapes sequentially:

CREATE PROCEDURE MultipleResultTypesSequentially  
AS  
select * from products  
select * from customers  

[!code-csharpDLinqSprox#6] [!code-vbDLinqSprox#6]

Example 2

You would use code similar to the following to execute this stored procedure.

[!code-csharpDLinqSprox#7] [!code-vbDLinqSprox#7]

See also