如何通过导入dll进行数据访问时如何分离DAL和BLL? [英] How to separate DAL and BLL when data access is happening through importing dlls?

查看:66
本文介绍了如何通过导入dll进行数据访问时如何分离DAL和BLL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个服务层项目,其中所有数据访问和业务逻辑都在Web方法中。我想重构代码,以便将所有问题分开。通过使用导入的dll中的方法进行数据访问(没有任何链接到我们自己的数据库。我们正在使用一些第三方dll)。如何在这种情况下进行重构?这个案例最好的设计是什么?



我尝试过:



搜索但找不到合适的解决方案。

解决方案

在DAL Layer中引用所有数据访问dll。访问BL层中的DAL。你的页面中有BL和BL。

DAL - 单独的图书馆项目。

BL - 单独的图书馆计划。

申请。> BL> DAL。

I have a service layer project in which all the data access and business logic is inside web methods. I want to to refactor the code such that all the concerns are separated. The data access is happening by using methods from imported dlls(Does not have any link to our own database. We are using some third party dlls). How can refactoring be done in this situation? What would be the best design for this case?

What I have tried:

Searched but could not find appropriate solution.

解决方案

Refer all that Data access dll in DAL Layer. Access DAL in BL layer. and BL in your Page behind.
DAL - Separate Library project.
BL - Separate Library Project.
Application.> BL > DAL.


这篇关于如何通过导入dll进行数据访问时如何分离DAL和BLL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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