Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Entity Framework deal with multiple result sets (each from joined tables) from a stored procedure?

In Linq to SQL, I can't find an easy way to deal with multiple result sets returned by a stored procedure where each result set is from table joins. Each result set does not map directly to a table. (can't change this behavior). For now, it seems using a DataSet is a lot simpler.

Can the current Entity Framework or the upcoming one, 4.0, deal with these kind of scenarios straight from the designer? Or even from code done easily?

like image 632
Tony_Henrich Avatar asked Oct 16 '09 20:10

Tony_Henrich


1 Answers

This is an old question, but time marches on. I just wanted to add that as of the June 2011 CTP release EF now supports multiple result sets from a stored proc:

http://blogs.msdn.com/b/adonet/archive/2011/06/30/announcing-the-microsoft-entity-framework-june-2011-ctp.aspx

http://blogs.msdn.com/b/adonet/archive/2011/06/30/walkthrough-multiple-result-sets-from-stored-procedure.aspx

Disclaimer: The feature isn't part of EF 4.1, 4.2 or 4.3. Apparently it is going to be packaged with .NET 4.5 & EF 5.0.

like image 158
EBarr Avatar answered Oct 11 '22 11:10

EBarr