This project is read-only.

Want result from multiple tables

Apr 9, 2010 at 1:50 PM


I want to pull out data from more than one table by joining tables. Say ex, I have customer table and other one is order table. Now I want to display tblCustomer.Name, tblCustomer.Division and tblOrder.QTY in grid.

How can I have generic list which contains data from both the table. We want to use RunSelect method on it so that we can have paging sorting and searching functionality on result set from both the table.

One more thing is, Do I have to create my own class CustomerOrder( which contains properties which i want in result. We normally put in select query in sql )

Please guide me. Thanks in advance.


Apr 20, 2010 at 7:57 PM

Currently you will need to define a custom view object and add your SQL to it. The object will be generated and is strongly-typed. There is no way to get an anonymous class back by arbitrarily joining tables on the fly.