문제

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")))
, "DateVal")
                .Add(Projections.Sum("TotalFare"), "TotalFare")
            );
도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top