GameFramework.DataDML.LoadAllTableAccount C# (CSharp) Метод

LoadAllTableAccount() приватный статический Метод

private static LoadAllTableAccount ( int start, int count ) : List
start int
count int
Результат List
        private static List<GeneralRecordData> LoadAllTableAccount(int start, int count)
        {
            List<GeneralRecordData> ret = new List<GeneralRecordData>();
            try {
              using (MySqlCommand cmd = new MySqlCommand()) {
                cmd.Connection = DBConn.MySqlConn;
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.CommandText = "LoadAllTableAccount";
                MySqlParameter inputParam;
                inputParam = new MySqlParameter("@_Start", MySqlDbType.Int32);
                inputParam.Direction = ParameterDirection.Input;
                inputParam.Value = start;
                cmd.Parameters.Add(inputParam);
                inputParam = new MySqlParameter("@_Count", MySqlDbType.Int32);
                inputParam.Direction = ParameterDirection.Input;
                inputParam.Value = count;
                cmd.Parameters.Add(inputParam);
                using (DbDataReader reader = cmd.ExecuteReader()) {
                  while (reader.Read()) {
                    GeneralRecordData record = new GeneralRecordData();
                    object val;
                    TableAccount msg = new TableAccount();
                    val = reader["AccountId"];
                    msg.AccountId = (string)val;
                    record.PrimaryKeys.Add(val.ToString());
                    val = reader["IsBanned"];
                    msg.IsBanned = (bool)val;
                    val = reader["UserGuid"];
                    msg.UserGuid = (ulong)val;
                    val = reader["IsValid"];
                    msg.IsValid = (bool)val;
                    record.DataVersion = (int)reader["DataVersion"];
                    record.Data = DbDataSerializer.Encode(msg);
                    ret.Add(record);
                  }
                }
              }
            } catch (Exception ex) {
              DBConn.Close();
              throw ex;
            }
            return ret;
        }