LINQ to SQL中的ASP.net 3层Web应用程序 [英] ASP.net 3 tier web application in LINQ to SQL

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

问题描述


我需要相同的帮助将LINQ转换为Sql.
我想使用LINQ to SQL在ASP.net 3.5中开发Web应用程序.
在此应用程序中,我想沿3层工作
-表示层
-DAL
-BLL
请指导我使用LINQ to SQL时如何构建此层.

哪个文件包含在DAL层中,以及我如何编写BLL层方法.

最好是帮我做一些3层的示例项目.


----------------
问候
Mohsin JK

Hi,
i need same help regard LINQ to Sql.
i want to develop a web application in ASP.net 3.5 using LINQ to SQL.
In this application i want to work along 3 layers
- Presentation Layer
- DAL
- BLL
Please guide me how this layer can be built when we use LINQ to SQL.

Which file includes in DAL layer and how i can write BLL layer methods.

it would better if help me with some sample project with 3 layers.


----------------
Regards
Mohsin JK

推荐答案



当对LINQ使用3层/层方法时,建议是在数据访问层中使用LINQ数据模型.并在DAL中编写LINQ To SQL方法.

从BLL进行调用以从DAL获取数据并将其传递到UI层.

如果您想使用任何服务公开您的BLL,仍然会遇到麻烦.然后,您必须编写一个Translator服务,该服务将业务实体转换为Data Contracts,反之亦然.


希望对您有所帮助!.

问候,
-Vinayak
Hi,

While using 3 layer/tier approach with LINQ, the suggestion would be to use LINQ data model in Data access layer. and write the LINQ To SQL methods in DAL.

From BLL make the call to get the data from DAL and pass it on to the UI Layer.

The twist remains, if you want to expose your BLL by using any service. Then you have to write an Translator service which converts business entities into Data Contracts and vice versa.


I Hope this helps!.

Regards,
-Vinayak


请参见


我需要相同的帮助将LINQ转换为Sql.
我想使用LINQ to SQL在ASP.net 3.5中开发Web应用程序.
在此应用程序中,我想沿着3层工作
-表示层
-DAL
-BLL
请指导我使用LINQ to SQL时如何构建此层.

DAL层中包含哪个文件以及如何编写BLL层方法.

最好是帮我做一些3层的示例项目.
Hi,
i need same help regard LINQ to Sql.
i want to develop a web application in ASP.net 3.5 using LINQ to SQL.
In this application i want to work along 3 layers
- Presentation Layer
- DAL
- BLL
Please guide me how this layer can be built when we use LINQ to SQL.

Which file includes in DAL layer and how i can write BLL layer methods.

it would better if help me with some sample project with 3 layers.


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

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