I'm trying to consume multiple results from a stored procedure, which returns 3 result sets.
- The first result is a single column called 'Message'.
- The second result set is a table
- The third result set is another table
My main problem is that every other example on how to approach multiple result sets from a stored procedure implies that every result set can be mapped to an entity, which is not the case with my first result.
First result:
Select @Message
Second result set returned from this query:
Select SecondId, SecondName
From T_Table1
Third result set returned from this query:
Select ThirdId, ThirdName
From T_Table2
Update I'm updating my EDMX directly, I'll include an Example from Microsoft and explain my problem.
<FunctionImport Name="s_GetAllData">
<ReturnType EntitySet="CustomerNames" Type="Collection(Model.CustomerName)" />
<ReturnType EntitySet="CustomerOrders" Type="Collection(Model.CustomerOrder)" />
<ReturnType EntitySet="CustomerShippings" Type="Collection(Model.CustomerShipping)" />
</FunctionImport>
According to this I'd need a Collection Type to reference (meaning I'd need a existing table within the Database that reflects the columns coming in).
You can't add a Table to EF Model unless it has a Key field, which I don't have in my Results.
public string Message { get; set; }