コード例 #1
0
        public async Task <HeatChartContext> GetContextAsync()
        {
            if (dbContext != null)
            {
                return(dbContext);
            }

            await Task.Run(() =>
            {
                dbContext = new HeatChartContext();
            });

            return(dbContext);
        }
コード例 #2
0
 public HeatChartContext GetContext()
 {
     return(dbContext ?? (dbContext = new HeatChartContext()));
 }