public List <IGrouping <string, CaseReportFormResult> > GetGroupedCaseReportFormsForPatient(int patientId)
        {
            IOrderedQueryable <CaseReportFormResult> forms = GetPatientsForms(patientId);
            var grouped = forms.GroupBy(f => f.Category.Name).ToList();

            return(grouped);
        }
Esempio n. 2
0
        public static EnumerableQuery ApplyGroupBy <T>([NotNull] this IOrderedQueryable <T> source, [NotNull] QueryConfig config)
            where T : class
        {
            if (config.GroupBy != null)
            {
                var info = config.GroupBy[0];

                return(source.GroupBy(info.ColumnCode));
            }

            return((EnumerableQuery)source);
        }