NHibernate的一个小问题

Gracewen17 2011-11-07 04:19:21

Configuration cfg = new Configuration();
cfg.Configure();
string path = System.Web.HttpContext.Current.Server.MapPath("sysNotice.Notice.hbm.xml");//调试在这句开始就断开不执行下面的了。
cfg.AddXmlFile(path);
new SchemaExport(cfg).Execute(true, true, false);



报错:Test 'M:aco.common.sysMgr.EntryPoint.GeneraterSchem' failed: 未将对象引用设置到对象的实例。
System.NullReferenceException: 未将对象引用设置到对象的实例。
EntryPoint.cs(39,0): 在 aco.common.sysMgr.EntryPoint.GeneraterSchem()

0 passed, 1 failed, 0 skipped, took 31.69 seconds (Ad hoc).
...全文
20 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

110,525

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧