Subscribe to Subscribers

Forums » .NET » LINQ »

How to write 3tier architecture


Posted Date: 28 Mar 2012      Posted By:: Mahesh Ramgari     Member Level: Bronze    Member Rank: 3149     Points: 1   Responses: 5



how to write 3tier architecture program using linq in c#.net and asp.net



Responses

#663760    Author: Vijayalakshmi G M      Member Level: Gold      Member Rank: 84     Date: 28/Mar/2012   Rating: 2 out of 52 out of 5     Points: 2

Hi,

Three Tier Architecture consists of 3 Layers

1. Presentation Layer - Used by the End user to interact with the application.
2. Application Layer - Used to Implement the business logc
3. Database Layer - Stores the Data in the Database.

Vijayalakshmi G M
Senior Trainer
Visit My blog


 
#663767    Author: Anil Kumar Pandey      Member Level: Platinum      Member Rank: 1     Date: 28/Mar/2012   Rating: 2 out of 52 out of 5     Points: 2

Please read this nice article on 3 tier architecture.


dotnetfunda.com/articles/article71.aspx


Thanks & Regards
Anil Kumar Pandey
Microsoft MVP, DNS MVM


 
#663777    Author: Siva Prasad      Member Level: Gold      Member Rank: 62     Date: 28/Mar/2012   Rating: 2 out of 52 out of 5     Points: 3

Three Tier Architecture comprises the following 3 tiers/layers.
1st layer/tier : UI Layer or Presentation layer meant for apsx page interaction.
2nd layer/tier : Business Access layer(BAL) meant for business logic according to application requirements.
3rd layer/tier : Data Access Layer(DAL) meant for DML(Data Manipulation Language) operations like insert, update and delete through code behind in DAL class library application.
We can make queries by using LINQ in BAL & DAL using c#.





 
#666184    Author: Sudhakar      Member Level: Silver      Member Rank: 501     Date: 12/Apr/2012   Rating: 2 out of 52 out of 5     Points: 4

Purpose of n tier application:

1st layer/tier : User Interface Layer or Presentation layer meant for user interaction with the application, we can have simple windows or web form to develop this layer.

2nd layer/tier : Business Access layer(BAL) meant for business logic to implement the business validations and business requirements. (Can use simple LINQ to objects in this layer)

This can be simple class library.

3rd layer/tier : Data Access Layer(DAL) in this layes we can create intiate and use the ADO.net object to communicate with te data base. to perform the DML operations. (Can use LINQ to Sql in this layer.)

This can be simple class library.


 
#666338    Author: SonyMadhu      Member Level: Gold      Member Rank: 45     Date: 13/Apr/2012   Rating: 2 out of 52 out of 5     Points: 4

Hi Mahesh,



3 tier architecture includes:
Business Logic (Business entities)
Data Access Layer (Database code)
Presentation Layer (User Interface)

Refer the below simple login ex:


UI:Login Page

public partial class login : System.Web.UI.Page
{
businessLogic obj = new businessLogic();
protected void button_Click(object sender, EventArgs e)
{
obj.Username = username.Text;obj.Password = password.Text;
obj.loginbll();
Response.Redirect("HOme.aspx");
}
}

BLL:using databaselogic;

public class businessLogic {public businessLogic ()
{
databaselogic obj_Bl = new databaselogic();
}
public string _username, _password;
public string Username
{
get
{
return _username;
}
set
{
_username= value;
}
}
public string Password
{
get
{
return _password;
}
set
{
_password = value;
}
}
public void loginbll()
{
obj_Bl.login(Username,Password);
}

DAL:namespace databaselogic

{

public class databaselogic
{
public databaselogic()
{
}
public void login(string username, string password)
{
//code related to Queries goes on here
}
}
}


Hope this will give some idea

Regards,
Madhu
Be so hapy wen others look at you,they become hapy too


 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Next : Nullable IEnumerable Int32 comparison with null
Previous : Need a LINQ Query for the SQL Query
Return to Discussion Forum
Post New Message
Category:

Related Messages

Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Talk to Webmaster Tony John
Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
2005 - 2013 All Rights Reserved.
.NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
Articles, tutorials and all other content offered here is for educational purpose only.
We are not associated with Microsoft or its partners.