In every ASP.NET application I have written, I would make number of request to the database before outputting the information onto the web page.
For example:
var DataTable1 = GetDataTable('Select * From Customers'); var DataTable2 = GetDataTable('Select * From Products'); var DataTable3 = GetDataTable('Select * From Orders');
As far as I’m aware, the code above would make 3 separate trips to the database and would do them one after the other.
Is there anyway I can gather together my parameterized SQL statements and make only 1 trip to the database server?
1 Answer