开发者

The name 'NHibernateUtil' does not exist in the current context

开发者 https://www.devze.com 2023-01-29 11:53 出处:网络
Below projection query throws \" The name \'NHibernateUtil\' does not exist in the current context\" error when I try to run the app. I tried including namespace NHibernate.Util but it still wont work

Below projection query throws " The name 'NHibernateUtil' does not exist in the current context" error when I try to run the app. I tried including namespace NHibernate.Util but it still wont work. Any help would be appreciated.

 template.Criteria.SetProjection(
                Projections.ProjectionList()
                .Add(Projections.GroupProperty(Projections.SqlFunction("date",NHibernateUtil.Date,Projections.GroupProperty("IssueDateTime")))
, "D开发者_运维知识库ateVal")
                .Add(Projections.Sum("TotalFare"), "TotalFare")
            );


The NHibernateUtil class is in the NHibernate namespace, not NHibernate.Util

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号