Click here to Skip to main content
15,919,132 members
Please Sign up or sign in to vote.
1.70/5 (3 votes)
See more:
hi friends please suggest me how to build 3 tier application using c#
please send me a simple demo with all layer and insertion of some data eg. name, id ,address
Posted
Comments
Vani Kulkarni 12-Jul-12 2:46am    
What have you tried till now? I assume you asking about web application.

Three-tier (layer) is a client-server architecture in which the user interface, business process (business rules) and data storage and data access are developed and maintained as independent modules or most often on separate platforms. Basically, there are 3 layers, tier 1 (presentation tier, GUI tier), tier 2 (business objects, business logic tier) and tier 3 (data access tier). These tiers can be developed and tested separately.

Refer:
Tutorial 1: Creating a Data Access Layer[^]
Tutorial 2: Creating a Business Logic 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#[^]

Also have a look at these:
3 Tier Architecture[^]
4 Tier Architecture[^]
Three Tier Code Generator For ASP.NET[^]
Three Tier Architecture in ASP.NET[^]
What Is 3-Tier(Multi-Tier) Architecture And Why Do You Need It?[^]
 
Share this answer
 
Is Google[^] broken at your place?
There are about 474,000 results (0.26 seconds) for your query. Try out google sometimes.
For web app:
building 3tier app[^]
a-simple-3-tier-layers-application-in-asp.net[^]

For windows app:
3-tier architecture in C#[^]
http://social.msdn.microsoft.com/Forums/en-IE/winformsapplications/thread/2c15af26-7758-4268-9568-5932225cca32[^]
 
Share this answer
 
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#[^]
 
Share this answer
 
you can used mvc framework for implement Three-tier architecture.
and you can used web form than build data application layer , presentation layer ,business application layer
and you want to more help than used
http://social.msdn.microsoft.com/Forums/pl-PL/netfx64bit/thread/86b50b3d-97a8-4ef0-81ee-0c63d19b483f[^]
http://msdn.microsoft.com/en-us/library/aa286485.aspx[^]
 
Share this answer
 
3tier in the sense you need 3 -layers as follows
1-user interface & validation(console app,asp.net etc..(then in this project add two dll files by right click on the project name and then later add the reference between them ))
2-dll or reusable component.
3-dll or reusable component.
then 3rd layer will interact with SQL SERVER Database.
 
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