什么是asp.net中的3层 [英] what is 3 tier in asp.net

查看:77
本文介绍了什么是asp.net中的3层的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们如何在asp.net中实现3层体系结构?

how we can implement 3 tier architecture in asp.net?

推荐答案


不用担心.这是一个简单的任务.

创建一个用于DBconnection的类.在方法中使用连接字符串重现该值.
为DBAccess创建一个类-用于qyeries(插入,删除,更新,过程).
为BAccess(业务登录)调用DBAcess并传递参数创建一个类.
Last =来自BAAcess必需函数中传递值后面的代码.
There is not to worry about it. It is a simple task.

Make a class for DBconnection.Make connection string in a mehtod returing the value .
Make a class for DBAccess-For qyeries (insert,delete,update,procedures).
Make a class for BAccess (Business Login)-call DBAcess and passing through parameter.
Last=From code behind pass values in BAAcess required function.


只需将您的应用程序分为三层即可,

1.表示层
其中将包含所有东西,使您的项目可以从正面显示所有类型的css,皮肤,使用过的控件等.

2.业务层
这样可以确保插入到您的演示文稿侧的数据是有效的.请在此处使用所有类型的业务验证.

3.数据层
所有与数据相关的任务都将连接到数据库并检索任何数据值.

您可能有
THIS [
Simply just divide your application in three tiers as

1. Presentation Layer
Which will contain all the thing which makes your project to be presented from front side all types of css,Skins,Controls you have used etc.

2.Business Layer
Which ensures that the data inserted in your presentation side is Valid upto.Use all kind of business validation here.

3.Data Layer
All the data related task weather connecting to database and retrieving any data values.

You could have THIS[^] Link to be useful for further information.

Please vote and Accept Answer if it Helped.


这篇关于什么是asp.net中的3层的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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