N
Nemisis
hi all,
If i have a table in my database, and that table contains foreign keys
to other tables, should i extract the data from the other tables at the
same time, or should my business layer call the separate DAL retrieve
methods for each child object?
if i take the example of a company and contact, my contact table
contains a foreign key pointing to the company table.
Now if i want to retrieve the details of the company at the same time
as retrieving the details of the contact, should the DAL call the
CompanyDataService and retrieve that companies details?
Or do i just return the Contact data to the business layer and then my
business layer would call the CompanyDataService to obtain the data for
the company??
If anyone could write a very very short example, to help me understand
i would really appreciate it. Ta
If i have a table in my database, and that table contains foreign keys
to other tables, should i extract the data from the other tables at the
same time, or should my business layer call the separate DAL retrieve
methods for each child object?
if i take the example of a company and contact, my contact table
contains a foreign key pointing to the company table.
Now if i want to retrieve the details of the company at the same time
as retrieving the details of the contact, should the DAL call the
CompanyDataService and retrieve that companies details?
Or do i just return the Contact data to the business layer and then my
business layer would call the CompanyDataService to obtain the data for
the company??
If anyone could write a very very short example, to help me understand
i would really appreciate it. Ta