asp.net 三层中DAL读取Web.config配置文件

在DAl层中添加一下引用:
添加引用:
using System.Web.Configuration;
web.config中连接数据库的字符串:
获得web.config中连接数据库的字符串:
private static readonly string MySqlConnectionString = WebConfigurationManager.ConnectionStrings["mysqlconnstring"].ToString();
版权声明:
作者:东明兄
链接:https://blog.crazyming.com/note/156/
来源:CrazyMing
文章版权归作者所有,未经允许请勿转载。


共有 0 条评论