- Back to Home »
- .NET »
- 3 layer architecture
Posted by :
Sudhir Chekuri
Saturday, 18 March 2017
Create website- ASP Project
Create class library - BAL
Create class library - DAL
Add references as below:
BAL in ASP Project
DAL in BAL
Adding class:
Right click on dal project
add class with name as DUser.cs
Make class as public bcoz it is used in other project.
To use some namespaces you have to add reference in DAL project
Right click on DAL Project
Add references
In assemblies/.NET add System.Configuration to use ConfigurationManager class in DAL layer.
Create DUser class - Write method with parameters and ADO.NET Code.
Right click on BAL Project
Add BUser class - Write method with parameters and C# logic
Sending inputs:
PL - input parameter (txt.text) - > BAL - input parameter (variables) -> DAL
Returning values:
DAL - return value -> BAL - return value -> PL
Calling methods:
Call methods of BAL from Presentation layer.
Call methods of DAL from BAL.