public List <Revive> GetRevives(int characterID) { List <object[]> data = context.GetRevives(characterID); List <Revive> revives = new List <Revive>(); foreach (object[] row in data) { for (int i = 0; i < Convert.ToInt32(data[5]); i++) { revives.Add(new Revive(Convert.ToInt32(row[0]), row[1].ToString(), Convert.ToInt32(row[2]), row[3].ToString(), Convert.ToInt32(row[4]))); } } return(revives); }