IndieAPI.Server.UserManagement.User.LoadFromDB C# (CSharp) Method

LoadFromDB() public method

public LoadFromDB ( System.Action actionOnComplete ) : void
actionOnComplete System.Action
return void
        public void LoadFromDB(Action actionOnComplete)
        {
            using (var cmd = GameDB.NewCommand())
            {
                cmd.CommandText.Append("select nickname, level, exp");
                cmd.CommandText.Append($" from t_profiles where userno={UserNo};");

                cmd.CommandText.Append("select regdate, lastlogindate, continuous_count, daily_count");
                cmd.CommandText.Append($" from t_logincounts where userno={UserNo};");

                cmd.CommandText.Append($"select textdata from t_textbox where userno={UserNo};");
                cmd.PostQuery(
                    () =>
                    {
                        Profile.LoadFromDB(cmd.Reader);

                        cmd.Reader.NextResult();
                        LoginCounter.LoadFromDB(cmd.Reader);

                        cmd.Reader.NextResult();
                        TextBox.LoadFromDB(cmd.Reader);
                    },
                    (e) =>
                    {
                        actionOnComplete();
                    });
            }
        }