Data Access Layer Calls

N

Nemisis

Hi everyone,

Maybe a silly question but if i have DataService1 - 5 in my data access
layer, and DataService3 returns a dataset that contains many fields,
one of which is a foreign key. The foreign key belongs to a table that
i retrieve using DataService 4.

Is it ok, to call the DataService4 retrieve method, from within
DataService3, or should i write it as part of the SQL for
DataService3??

If this doesnt make sense, i am sorry.lol
 
S

sloan

When I am "merging" data. I usually do this in the business layer.

Lets say I have Orders in one database, and ProductStock in another.

BizLayer


DataObject1 do1 = new DataObject();
DataSet ordersDs = do1.GetOrders();

DataObject2 do2 = new DataObject2();
DataSets inventoryDs = do2.GetProducts();

DataSet masterDs = null;
masterDs = ordersDs;
masterDs.Merge(inventoryDs);


Something like that.

..Merge can merge tables. It can merge ~different rows. You'll have to
experiment with overlapping rows, its not very friendly.

But I would keep my datalayer objects seperated. datalayer objects should
be pretty dumb.

http://sholliday.spaces.live.com/?_...ogview&_c=blogpart&partqs=amonth=5&ayear=2006
I might check my May and June 2006 blog entries.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top