Click here to Skip to main content
15,905,322 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I created a three tier application, but I'm having some problems.
First i created a web project and created also one App_Code folder in which I created three subfolders like BO (business objects) BLL (business logic layer) and DAL (data access layer).
I made some classess in all of subfolders but the problem is that i can not call classes from one folder to other.
Also i tryed another with adding class libraries for BO, BLL and DAL and as a reference I made Min Project.
Still having trouble to access the classes.
Is there a problem to call the though namespaces or I'm really stucked and have no clue how to fix this.
Thank you in advance for taking time reading this article.
Posted

Refer: How to create 3 tier[^]

..and more similar answers on CP Answers[^]
 
Share this answer
 
In real time scenario adding two folders in App_Code is not considered as three tier architecture. You have to create two different class library project and then add reference them from your application For example: Create a class library project like YourProjectBusinessLayer and another class library project as YourProjectDataAccessLayer. Add a reference to YourProjectBusinessLayer for YourProjectDataAccessLayer and a reference to your web application project for YourProjectBusinessLayer.

This will make the hierarchy something like:

YourProject->YourProjectBusinessLayer->YourProjectDataAccessLayer

Hope it helps.

This[^]

and

This [^]

are good examples to start.
 
Share this answer
 
v2
 
Share this answer
 
Comments
dr_iton 5-Jun-13 5:23am    
After creating the three Class Libraries, there at the solution it tells me that I have 4 projects. The main one is named ScoMan in which one I have the web forms. The other ones I created as a class libraries are called BO (business objects), BLL (business logic layer) and DAL (Data access layer).
In BLL I created project classes like KlasaIURD (class Insert, Undo, Read, Delete), also I created a class in Bo named Klasa that holds the data of table from SQL server named KLASA,
in DAL created a class named KlasaDB where I'm planning to create stored procedures.
I need somehow to call Klasa from BO to the DAL and vice versa.
How to call them from different nsamespaces.
_Amy 5-Jun-13 6:02am    
Check you DAL class is public or not. If no then make it public. Add the DAL's DLL to your BL and call the function on DAL in BL using the NameSpace and Class Object.
I solved the problem making reference of other namespaces and using them in a proper manner.
Thank you all for your time.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900