LINQ to NHibernate - .GroupBy().Skip().Take() cause an exception
问题 NHibernate version 3.3.1.4000 Query: IQueryable<Activity> activities = _repository.GetList<Activity>(); IQueryable<ActivityStatistic> statistics = activities .GroupBy(activity => activity.ActivityLicense.SerialNumber) .Select(grouping => new ActivityStatistic { ActivityCount = grouping.Count(), LicenseCode = grouping.Key }) .OrderBy(stat => stat.LicenseCode); List<ActivityStatistic> result = statistics .Skip(request.StartIndex) .Take(request.Count) .ToList(); If I comment Skip/Take code, it