In the NHibernate, how to loop and get results ? for example, how to get ‘totalAmount’ and ‘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'
Thanks
“how to loop and get results” u can make: