Author: NewToDotNet | Posted on: 7/10/2008 7:18:10 AM | Views : 1009

My project consists of 3 layers: Presentation, Business and Data Access.  I need to be able to lookup customers based on one or more customer status levels (open, closed, in legal, blocked or in active).  My Data Access Layer has a class called CustomerDB. Within that class is a method called GetAll.  Get All takes either one or more status values.

 My question concerns my business layer and presentation layer.  I am not sure which of the following is a better way of doing things:

Option #1

Have the presentation layer set and pass the status value(s) to Business class CustomerManager.GetAll which would then call and pass the status to CustomerDB.GetAll

 Option #2

Remove the generic GetAll method from the business class, and create the following Methods in the CustomerBusiness GetAllOpen, GetAllClosed, GetAllInLegal ...etc.  Then the Presentation layer would Invoke&n ...

Go to the complete details ...