在 NHibernate 中,如何循环并获得结果?例如,如何获得 'totalAmount' 和 'MY_CODE' ?
var criteria = Session.CreateCriteria<MyClass>();
ProjectionList projectionList = Projections.ProjectionList();
projectionList.Add(Projections.RowCount(), "totalAmount");
projectionList.Add(Projections.GroupProperty("MY_CODE"));
criteria.SetProjection(projectionList);
var resultList = criteria.List();
// how to get 'totalAmount' and 'MY_CODE'
谢谢