Пример #1
0
        public static async Task <ChartModel <TX, TY> > Create <TX, TY, TContext>(WidgetOptions options, BaseDbContext <TContext> dbContext, string sql, params object[] parameters)
            where TContext : DbContext
        {
            List <ChartEntity <TX, TY> > data = await dbContext.FromSql <ChartEntity <TX, TY> >(sql, parameters)
                                                .Select(m => m).ToListAsync();

            return(CreateChartModel <TX, TY>(data, options.XAxisLabel, options.YAxisLabel));
        }
Пример #2
0
 public abstract Task <ChartModel <string, int> > GetWidgetData(int widgetId, WidgetOptions options);