Data Access and three tier RRS feed

  • Question

  • User1965457893 posted
    I read somewhere that the data access block can be used in place of a data access layer. Is it good practice to use the data access block in the business logic layer?
    Thursday, April 12, 2007 1:10 PM

All replies

  • User1754323106 posted
    I don't think so.... as business layer is suppose to process your data returned from database and do whatever that is you need per your business rules....
    Thursday, April 12, 2007 2:29 PM
  • User1696511887 posted

    I'm building an app with a Business Layer, Data Layer, and Service (Facade) Layer.  The Business Layer contains the business objects/entities like Customer, Order, Product.  It has no knowledge of any of the other layers.  My Data Layer contains the data methods like GetProduct(int ProductId), GetProductsByCategory(int CategoryId), CreateProduct(Product p), etc.  It has knowledge of the Business Layer so I can pass the objects to the Create/Update/Delete methods.  My third layer is the Service Layer.  It knows about the Business Layer and the Data Layer.  It is the layer that the UI layer interfaces with.  By laying the project out in this way I was able to avoid the circular reference problems.

    If you are interested in understanding this a little bit further, I've found DoFactory's .Net Pattern Framework tremendously helpful.  To me it was well worth the $79.

    Friday, April 27, 2007 10:38 AM