コード例 #1
0
        private async Task <bool> LoadAsync()
        {
            if (await ServerDB.PingAsync())
            {
                ServerLogger.LogInfo($"Connected to database");
            }
            else
            {
                ServerLogger.LogError($"Couldn't connect to database: {Environment.NewLine}{ServerDB.ConnectionString}");
                return(false);
            }
            await DataMgr.LoadAllAsync();

            ServerLogger.LogInfo($"Data loaded: {DataMgr.Info}");
            return(true);
        }