ActiveRecord的ProjectionQuery
Castle.ActiveRecord.Queries.ProjectionQuery<CheckOutInfo> pq = new Castle.ActiveRecord.Queries.ProjectionQuery<RelationInfo>(
criteria, Projections.ProjectionList()
.Add(Projections.Sum("Quantity"))
.Add(Projections.GroupProperty("ClassA"))
.Add(Projections.GroupProperty("ClassB"))
);
criteria, Projections.ProjectionList()
.Add(Projections.Sum("Quantity"))
.Add(Projections.GroupProperty("ClassA"))
.Add(Projections.GroupProperty("ClassB"))
);
需要作分组以及统计操作时,需要用到ProjectionQuery.