本文介绍了执行HQL查询时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我正在关注.
Hi guys ,
I am doing following .
public static IList<ClsCompany > RetreiveAll()
{
IList<ClsCompany> Company = null;
try
{
using (var Session = ClsNhiberateHelper.OpenSession())
{
NHibernate.IQuery Query = Session.CreateQuery("from tblCompany tc order by tc.company ");
Company = Query.List<ClsCompany>();
return Company;
}
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
}
并获得Followung异常
tblCompany未映射[来自tc.company的tblCompany tc订单]
请帮帮我,为什么我会收到这个消息?
And Getting followung exception
tblCompany is not mapped [ from tblCompany tc order by tc.company ]
Please help me Why i am getting This?
推荐答案
这篇关于执行HQL查询时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!