public async Task <HeatChartContext> GetContextAsync() { if (dbContext != null) { return(dbContext); } await Task.Run(() => { dbContext = new HeatChartContext(); }); return(dbContext); }
public HeatChartContext GetContext() { return(dbContext ?? (dbContext = new HeatChartContext())); }