nhibernate2.0.1--configuration问题,求高人指点一二
问题是这样:
NHibernate2.0.1GA
通过
Configuration config = new Configuration()
.SetDefaultAssembly(typeof(Person).Assembly.FullName)
.SetDefaultNamespace(typeof(Person).Namespace)
.AddDirectory(new DirectoryInfo(HostingEnvironment.MapPath("~/App_Data/")));
方式测试成功;
但为什么这样写
Configuration config = new Configuration();
config.AddXmlFile(Server.MapPath("~/App_Data/Person.hbm.xml"));
确总是报Could not compile the mapping document: E:\MySolution\NhibernateWeb\App_Data\Person.hbm.xml错误呢!
难道是我写错了吗?
那正确的写法该怎样写!
谢谢