Enitity Framework Stored Procedures with Multiple Result Sets
I recently had the need to call a stored procedure that returned multiple result sets from within EF and have EF bind the results to a strongly typed collection.
https://gist.github.com/ScottGuymer/5663359
This works really well and EF does all the heavy lifting of mapping the result sets to the objects.
The only issue I ran into was having to add the paramater name for the stored procedure in the CommandText like so
cmd.CommandText = "[dbo].[storedProcedureName] @Query"
Written by Scott Guymer
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Entity framework
Authors
![](https://coderwall-assets-0.s3.amazonaws.com/uploads/user/avatar/87985/0_zdfeR_mEXTupLEu3BexRR3SzkFRKbdj3cHRcR3YoUXf8ZSoTMf0kvToXE7U7XapDqoDnqQuHhLpg.jpeg)
blaiseliu
10.04K
![](https://coderwall-assets-0.s3.amazonaws.com/uploads/user/avatar/126864/262292_425479734154770_939732499_n.jpg)
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#