public async Task <Dashboard?> GetDefaultDashboardAsync(CancellationToken token = default) { Dashboard?dashboard = null; async Task FetchDashboardAsync() { dashboard = (await _dbContext.GetItemsAsync <Dashboard>()) .FirstOrDefault(d => d.Name == "Dashboard"); } if (dashboard == null) { await _dbContext.SynchronizeAsync(token); await FetchDashboardAsync(); } return(dashboard); }