Click here to Skip to main content
15,889,116 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi I'm Creating Project called Test using 3-tier architecture in asp.net for this i have followed these steps File->New Project->Asp.Net Web Application And Named as Test.UI now i need DAL, BLL Layers for this File Menu Add New Project but not New->Project and i took class library and followed same for BLL, I gave the reference for BLL of DAL but when i create a new class in DAL and rebuild-ed the solution i cannot access it in BLL project Please Help
Posted
Updated 23-Apr-13 2:08am
v2

Create a class library - BusinessLogic. Add a reference of it in UI layer project.
Create a class library - DataAccess. Add a reference of it in BL layer project.

Now, from your UI, use the object model and pass on to BusinessLogic project class. This class is a Business logic class. Do the changes as per your need here.
Now, pass on the changed data from business logic class to dataAccess project class. In this class, use ADO.NET and pass on the needed values to Stored Procedure.

For getting back data, it will be transferred from DA to BL and then BL to UI layer.
Have a look at these, explaination with samples:
3-tier architecture in C#[^]
3-Tier Architecture Examples[^]
3-Tier Architecture in ASP.NET with C#[^]

More sample links provided in this answer: Beginner Projects for Visual C# with VS/SQL 2005[^]
 
Share this answer
 
Comments
_Amy 23-Apr-13 7:03am    
+5!
Sandeep Mewara 23-Apr-13 7:11am    
Thanks Amy.
StianSandberg 23-Apr-13 7:41am    
+5
Sandeep Mewara 23-Apr-13 7:46am    
Thanks.
CSS
create class and name it as you want, by it will be " BOLpage.cs"

then define every variable used in your program as
 Collapse | Copy Code
private vST;

then create property procedures ( which will get and set the values) as
 Collapse | Copy Code
public String ST
{
      get
      {
         return vST;
      }
      set
      {
          vST=value;
       }
}

and define functions for your programs as
 Collapse | Copy Code
public void fun1(class_name objectOf_class_name)
{

}

.


Same way create DSLpage.cs for Database interaction.

On your code-behind page , call both classes for appropriate use.
 
Share this answer
 
Add the particular namespace of the Dal
 
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