我的第3层Web应用程序 [英] My First 3 Tier Web Application

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

问题描述

我想要3层体系结构代码,其中在数据访问层使用了存储过程.项目应该在asp.net Web应用程序中.

I want 3 tier architecture code where in data access layer stored procedure is used. Project should be in asp.net web application.

推荐答案

我想要3层体系结构代码...
还有什么? :doh:

这是询问者的期望:
1. 先尝试您要做什么!您可能会发现它并不难.
2.制定看起来像问题/无法解决的问题.

试试看,告诉他们是否遇到问题.




现在,请尝试以下操作:
创建一个类库-BusinessLogic.在UI层项目中添加它的引用.
创建一个类库-DataAccess.在BL层项目中添加它的引用.

现在,从您的UI,使用对象模型并传递给BusinessLogic项目类.此类是业务逻辑类.在此处根据您的需要进行更改.
现在,将更改后的数据从业务逻辑类传递到dataAccess项目类.在此类中,使用ADO.NET并将所需的值传递给存储过程.

为了获取数据,数据将从DA传输到BL层,然后再从BL传输到UI层.
看看这些,用示例进行解释:
C#中的三层体系结构 [ 3-层架构示例 [使用C#的ASP.NET中的3层体系结构 [
I want 3 tier architecture code...
What else? :doh:

Here is what is expected of enquirers:
1. TRY first what you want to do! You may find that it''s not that hard.
2. Formulate what was done by you that looks like an issue/not working.

Try them and tell if you face issues.




For now, try this:
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#[^]


Hai

请在下面参考此链接...


http://geekswithblogs.net/edison/archive/2009/04/05/a-simple-3-tier-layers-application-in-asp.net.aspx






希望对您有帮助....
Hai

refer this link below...


http://geekswithblogs.net/edison/archive/2009/04/05/a-simple-3-tier-layers-application-in-asp.net.aspx






Hope it will helps you....


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

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