ASP.NET BLL,DAL连接字符串设置 [英] ASP.NET BLL, DAL connection string setup

查看:73
本文介绍了ASP.NET BLL,DAL连接字符串设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ASP.NET 2.0系统,我正在寻找一种方法来尝试根据每个公司设置连接字符串以减轻SQL开销.我正在尝试将提供程序方法与BLL和DAL一起使用.我不知道如何正确地将标识符传递给对象,以根据登录的用户从公司特定的数据库中提取.任何人都首先提出任何编码建议,然后再提出可能的硬件软件建议以分散负载?

I have a ASP.NET 2.0 system and I am looking at a method to try and setup a connection string based on each company to offload the SQL overhead. I am trying to use the provider method with BLL and DAL. I have no Idea how to properly pass an identifier down to the object to pull from a company specific database depending on which user is logged in. Anyone have any coding suggestions first off, and then possible hardware software suggestions for spreading out the load?

推荐答案

您可以在web.config的AppSettings中使用字段,而在数据库中可以在web.config的字段中使用与之相关的字段.
You can use a field in AppSettings in web.config and in database a field that related it field in web.config.


这篇关于ASP.NET BLL,DAL连接字符串设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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