Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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 23-Apr-13 1:56am
Edited 23-Apr-13 3:08am
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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[^]
  Permalink  
Comments
_Amy at 23-Apr-13 7:03am
   
+5!
Sandeep Mewara at 23-Apr-13 7:11am
   
Thanks Amy.
AlluvialDeposit at 23-Apr-13 7:41am
   
+5
Sandeep Mewara at 23-Apr-13 7:46am
   
Thanks.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

Add the particular namespace of the Dal
  Permalink  

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



Advertise | Privacy | Mobile
Web04 | 2.8.1411022.1 | Last Updated 6 Dec 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100