In Entity framework 4.0 how can we fetch multiple record set from database in one call & pass all data to View

StackOverflow https://stackoverflow.com/questions/10239513

Question

In Entity framework 4.0 how can we fetch multiple record set from database in one call like we do in ado.net dataset?

Soppose we have 3 table T1,T2 and T3. We need to fetch data from all tree table and pass to view(ASP.NET MVC3). No JOIN is to be used as all are independent table. Instead of making 3 call to database we want to wrap up all select statement in one SP and make only one call to database and pass all data to view.

In case of dataset if stored procedure return data from multiple select statement dataset populate each recordset in different table.

How can we achieve it in EF? Please help me.

Thanks,

Paul

Was it helpful?

Solution

There is no out of the box feature to batch queries in EF. But there are some efforts made by others to extend EF to support this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top