Where should I exclude and select information BL or DL?

Posted by MRFerocius on Stack Overflow See other posts from Stack Overflow or by MRFerocius
Published on 2010-04-03T01:10:49Z Indexed on 2010/04/03 1:13 UTC
Read the original article Hit count: 340

Hi guys;

I have another conceptual question. Suppose I have a Data Layer and a Bussines Layer. I have on my data base for example Customers and those customers has an assigned Vendor:

Customers(customerID, customerName, customerAddress, vendorID)
Vendors(vendorID, vendorName, vendorAddress)

Now suppose my Vendor logs into my web application and wants to see all his customers:

a) Should I use my Datalayer method and there find his customers on the query?

b) Should the data layer return all the customers and on the Buissnes Layer filter that vendor ones?

Is B even a good approach because is the one I want to use.... Is it correct?

Thanks in advance!!!

© Stack Overflow or respective owner

Related posts about business-logic

Related posts about dal