Blog

Use Class Library as BLL, BO and DAL Layers

Posted by Vikas Ahlawat Blogs | .NET Assemblies May 22, 2012
In this Bolg we learn use of Class Library as BLL(BusinessLogicLayer), BO(BusinessObject) and DAL(DataAccessLayer) Layers.

Intro:  This is small article is base on class library. In this article I will tell you how use class library as a BLL,BO and DLL and how use them by add references.

First add an new project (ASP.NET web app.)

Now add three solution folders as BLL, BO and DLL by right clicking on solution, you can see in the image.

now right click on the BO folder and follow the image.

1.jpg


2.jpg

We have added Class library with name:- BusinessObjects.

Now right click on BusinessObjects Class library and add your classes.

By follow same steps you can create BLL and DAL.

3.jpg

Build your BusinessObject :- Right click on BusinessObject and click on buil.

Now for add BusinessObject ref. in BusinessLogicLayer.

Follow the following image

4.jpg

References added

5.jpg

Now add nemspaces

Now you can use Business object classes and DataAccessLayer Classes.

see in the following image

6.jpg

Now what is in your mind?

how use this BusinessLogicLayer in our real application.

am I right?

For this you need to build BusinessLogicLayer by simple right click on it and click on build.

Now add reference of BusinessLogicLayer in your real asp.net app. (eg. Pricegyan.com) [right click on referenes and now click on add ref.] see above step for add ref.

Now add namespace.

you can take the help form the following image.

7.jpg

COMMENT USING
PREMIUM SPONSORS
MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.
SPONSORED BY
  • MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.