Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我必须在 nhibernate 中编写下面的查询。
select count(*),Class from Student group by Class
请帮忙...
可能是这样的吗?
ProjectionList projList = Projections.ProjectionList(); projList.Add(Projections.GroupProperty("Class")); projList.Add(Projections.Count("Id")); var result = session.CreateCriteria<Student>() .SetProjection(projList) .List();