如何在不同的项目中使用不同的数据库 [英] How to use different database with different project

查看:112
本文介绍了如何在不同的项目中使用不同的数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有两个项目,其中一个主文件夹.我要处理一个特定数据库的项目,另一个要处理另一个数据库的项目.
例如:-www.main/dpl
我将访问dpl索引页和
www.main/lm
我将访问lm索引页

c#asp.net如何实现
以及如何检查此索引页中的dpl或lm

Hi,
I have a two project with one main folder.i want to acess one projcect with particular database and second for another database.
ex:-www.main/dpl
i will acess dpl index page and
www.main/lm
i will acess lm index page

how it is possible by c# asp.net
and how i will check this index page for dpl or lm

推荐答案


创建两个访问层,每个访问层用于一个项目,每个访问层都有一个连接字符串,就像您在两个项目之间分开一样.
最好的问候
M.Mitwalli
Hi ,
Create two access layers each one for project and each one have it''s connection string like that you separated between both project .
Best Regards
M.Mitwalli


企业库 [ ^ ]可以为您提供帮助.
The Enterprise Library[^] can help you out.


嗨@Pradhan

您可以将diffrent连接字符串用于diffrent项目
或uou可以将连接字符串放入指定项目的数据库中,并检索并使用.

希望对您有帮助

谢谢
Hi @Pradhan

You can use the diffrent connection string for the diffrent project
or uou can place the connection string in the database for the specified project and retrive it and use.

Hope it will help you

Thanks


这篇关于如何在不同的项目中使用不同的数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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