smhy8187

 

SQLServerDAL的引用找不到



谢谢大家.
已经找到问题了。
一个低级错误.
在BLL业务逻辑层没添加SQLServerDAL的引用.
有两个解决方法:
1:
在BLL业务逻辑层添加SQLServerDAL的引用.如果在BLL添加对引用的话稍微麻烦了点(本人比较懒)。如果加多个OracleServerDAL的话,不是又得添加OracleServerDAL引用.所以我采用了第二个方法.
2:
在BLL业务逻辑层中添加了System.Transaction命名空间的引用.不用添加SQLServerDAL的引用.这样就可以了。

我觉得还有个比较容易犯的小错误是
private static readonly string path = ConfigurationManager.AppSettings;

        public static IDAL.IAccount CreateAccount()
        {
            string className = path + ".Account";
            return (IDAL.IAccount)Assembly.Load(path).CreateInstance(className);
        }
path是程序集名称,而不是命名空间名。className=程序集名称+类名;

posted on 2008-04-02 17:03  new2008  阅读(1500)  评论(0编辑  收藏  举报

导航