使用c#的3层应用程序 [英] 3tier application using c#

查看:106
本文介绍了使用c#的3层应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们,请建议我如何使用c#

构建3层应用程序。请向我发送一个包含所有图层和插入一些数据的简单演示,例如。 name,id,address

解决方案

三层(层)是一种客户端 - 服务器架构,其中包含用户界面,业务流程(业务规则)和数据存储以及数据访问是作为独立模块开发和维护的,或者通常在不同的平台上进行。基本上,有3层,第1层(表示层,GUI层),第2层(业务对象,业务逻辑层)和第3层(数据访问层)。这些层可以单独开发和测试。



参考:

教程1:创建数据访问层 [ ^ ]

教程2:创建业务逻辑层 [ ^ ]



查看这些内容,解释样本:

C#中的3层架构 [ ^ ]

3 - 层架构示例 [ ^ ]

使用C#的ASP.NET中的3层体系结构 [ ^ ]



另外看看这些:

3层架构 [ ^ ]

4层架构 [ ^ ]

ASP.NET的三层代码生成器 [ ^ ]

三层架构在ASP.NET 中[ ^ ]

什么是3层(多层)架构以及为什么需要它? [ ^ ]


Google [ ^ ]在你的地方破了吗?

您的查询大约有 474,000个结果(0.26秒)。有时试试谷歌。

对于网络应用程序:

建设3层应用 [ ^ ]

a-simple-3-tier-layers-application-in-asp.net [ ^ ]



对于Windows应用程序:

C#中的3层架构 [ ^ ]

http://social.msdn.microsoft.com/Forums/en-IE/winformsapplications/thread/2c15af26-7758-4268 -9568-5932225cca32 [ ^ ]


创建一个类库 - BusinessLogic。在UI图层项目中添加它的引用。

创建一个类库 - DataAccess。在BL层项目中添加它的引用。



现在,从您的UI中,使用对象模型并传递给BusinessLogic项目类。此类是业务逻辑类。根据您的需要进行更改。

现在,将已更改的数据从业务逻辑类传递到dataAccess项目类。在这个类中,使用ADO.NET并将所需的值传递给存储过程。



为了获取数据,它将从DA传输到BL然后BL到UI层。

看看这些,对样本的解释:

C#中的3层架构 [ ^ ]

3层体系结构示例 [ ^ ]

使用C#的ASP.NET中的3层架构 [ ^ ]

3-使用c#在asp.net中的架构 [ ^ ]

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

解决方案

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?[^]


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[^]


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#[^]


这篇关于使用c#的3层应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆