Exemplo n.º 1
0
        //START Chart Test
        public Task <IEnumerable <PageSumChartQueryModel> > PageSumChartQuery()
        {
            string sql = "SELECT GRP_ID,SUM(CASE WHEN DATA_12 = @COLOUR THEN CAST(DOC_NB_PAGES AS INT)ELSE 0 END)as Colour_Totals,SUM(CASE WHEN DATA_12 = @MONO THEN CAST(DOC_NB_PAGES AS INT)ELSE 0 END)as Mono_Totals from dbo.ChartTestData GROUP BY GRP_ID;";

            return(_db.LoadChart <PageSumChartQueryModel, dynamic>(sql, new { COLOUR = "COLOUR", MONO = "MONO" }));
        }