B
BillG
Say I have a class called Invoice. An invoice consists of a header and
detail lines. In my class called Invoice I have a member which is a object
of a collection of DetailLines, defined as follows:
public class Invoice
{
.....
List <DetailLine> detail;
}
When I retrieve an invoice, I also want to retrieve the detail lines. So do
I retrieve the detail lines in my method GetInvoice(long invoiceNo) in the
Invoice class or is it more proper to have an InvoiceController class that
first gets the Invoice and then gets the detail lines and populates the
member field in the Invoice class.
I realize that it works both ways, but what is the best way to do it.
Bill
detail lines. In my class called Invoice I have a member which is a object
of a collection of DetailLines, defined as follows:
public class Invoice
{
.....
List <DetailLine> detail;
}
When I retrieve an invoice, I also want to retrieve the detail lines. So do
I retrieve the detail lines in my method GetInvoice(long invoiceNo) in the
Invoice class or is it more proper to have an InvoiceController class that
first gets the Invoice and then gets the detail lines and populates the
member field in the Invoice class.
I realize that it works both ways, but what is the best way to do it.
Bill