private async Task GetMainPageForumsAsync() { var forumCategoryEntities = await _db.GetMainForumsList(); if (forumCategoryEntities.Any()) { foreach (var forumCategoryEntity in forumCategoryEntities) { ForumGroupList.Add(forumCategoryEntity); } #if DEBUG ForumGroupList[3].ForumList.Add(ForumManager.AddDebugForum()); #endif return; } forumCategoryEntities = await _forumManager.GetForumCategoryMainPage(); foreach (var forumCategoryEntity in forumCategoryEntities) { ForumGroupList.Add(forumCategoryEntity); } await _db.SaveMainForumsList(ForumGroupList.ToList()); }