ASP.NET/Data Access Layer And Business Logic Layer

DAL (Data Access Layer) & BLL (Business Logic Layer)


Add New Item: DataSet Open the database viewer, drag and drop database tables into the DataSet viewer.

From the DataSet viewer, you can right click on the table, add new queries and configure them as per standard SQL using the wizard.

BLL (Business Logic Layer)

Add New Item: Class Naming Convention is to suffix the class name with BLL for example 'CustomersBLL'

Imports OrderingSystemDSTableAdapters

<System.ComponentModel.DataObject> _
Public Class CustomersBLL

    Private _customersAdapater As CustomersTableAdapter = Nothing
    Protected ReadOnly Property CustomersAdapater As CustomersTableAdapter
            If _customersAdapater Is Nothing Then
                _customersAdapater = New CustomersTableAdapter
            End If
            Return _customersAdapater 
        End Get
    End Property

    <System.ComponentModel.DataObjectMethod(ComponentModel.DataObjectMethodType.Select, True)> _
    Public Function getCustomer As OrderingSystemDS.CustomersDataTable
        Return CustomersAdapater.GetCustomers
    End Function

    <System.ComponentModel.DataObjectMethod(ComponentModel.DataObjectMethodType.Select, False)> _
    Public Function getCustomerByCustomerID(ByVal CustomerID As Integer) As OrderingSystemDS.CustomersDataTable
        Return CustomersAdapater.GetCustomerByCustomerID(CustomerID)
    End Function

End Class

  This article uses material from the Wikipedia page available here. It is released under the Creative Commons Attribution-Share-Alike License 3.0.


Manage research, learning and skills at IT1me. Create an account using LinkedIn to manage and organize your IT knowledge. IT1me works like a shopping cart for information -- helping you to save, discuss and share.

  Contact Us  |  About |  IT Training & References |  IT Careers |  IT Hardware |  IT Software |  IT Books