Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#4.0 ASP.NET4.0
Hi,
 
I am new to 3-Tier architecture.
I am implementing 3-Tier architecture.
I taken two class libraries for Business layer and Data access layer.
And written the class for INSERT method in DataAccess layer.
If I call the class in Business layer it is not taking,it giving error like
"Type or namespace could not be found(are you missing directive or an assembly reference)"
 
I have class InsertBAL() in BAL and InsertDAL() in DAL.
Can anyone tell me how to give reference of DAL in BAL and BAL in UI.
 
Thank you,
Posted 11-Jun-12 0:21am

1 solution

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#[^]
3-Tier Architecture in asp.net using c#[^]
  Permalink  
v2
Comments
Manas Bhardwaj at 11-Jun-12 5:52am
   
Correct +5!
Sandeep Mewara at 11-Jun-12 9:13am
   
Thanks Manas.
jaipal0908 at 11-Jun-12 6:00am
   
Thank you sandeep.It is working
Sandeep Mewara at 11-Jun-12 9:14am
   
Welcome. Good to know.
Prasad_Kulkarni at 11-Jun-12 6:13am
   
Great, +5!
Sandeep Mewara at 11-Jun-12 9:14am
   
Thanks Prasad.
vangapallynaveen at 11-Jun-12 6:17am
   
Good
Sandeep Mewara at 11-Jun-12 9:14am
   
Thanks.
Prasad_Kulkarni at 12-Jun-12 5:15am
   
Must be bookmark!
Volynsky Alex at 4-May-14 3:55am
   
Nice

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

  Print Answers RSS
0 OriginalGriff 7,903
1 Sergey Alexandrovich Kryukov 7,127
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,820


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 2 May 2014
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