In Linq 2 Sql, we can retrieve multiple re开发者_StackOverflow中文版sultsets from the same sp if we know the sequence of tables returned using IMultipleResults
, ResultType
and GetResult<>
.
I am sure, there must be a method in entity framework 4 for doing this.
You would think so, wouldn't you. :)
They couldn't sneak it in time for EF4.
In the meantime, you've got 2 options:
- Use the EF Extensions project.
- Use ObjectContext.Translate. You still need to iterate through the DataReader using classic ADO.NET though.
Check out this blog, look for the comment from Danny Simmons to explain the above.
精彩评论