H
Henke
I have a common Customer-Orders-OrderRows-Products hierarchy in my database.
Let's say I'd like to fetch a customer and all it's orders, rows and
products. Today we have methods on different DataAccessLogicComponents to
retrieve the data i.e:
CustomerDALC.GetCustomer(int id) - Gets the customer details
OrderDALC.GetOrders(Customer customer) - Gets the orders for the specified
customer and so on.
In the Get-methods I use SqlCommand.ExecuteReader and a SqlDataReader.
What is the best way to retrieve data stored in a hierarchy I mean in a
performance point of view?
When I used the DALCs, every Get-method creates a new connection to the
database which seems like reducing performance.
Thanks in advance!
/Henke
Let's say I'd like to fetch a customer and all it's orders, rows and
products. Today we have methods on different DataAccessLogicComponents to
retrieve the data i.e:
CustomerDALC.GetCustomer(int id) - Gets the customer details
OrderDALC.GetOrders(Customer customer) - Gets the orders for the specified
customer and so on.
In the Get-methods I use SqlCommand.ExecuteReader and a SqlDataReader.
What is the best way to retrieve data stored in a hierarchy I mean in a
performance point of view?
When I used the DALCs, every Get-method creates a new connection to the
database which seems like reducing performance.
Thanks in advance!
/Henke