public IList <ApTimeLine> GetTimelines() { MySqlCommand cmd = new MySqlCommand("get_timelines", connection); cmd.CommandType = CommandType.StoredProcedure; var reader = cmd.ExecuteReader(); IList <ApTimeLine> timeline = new List <ApTimeLine>(); while (reader.Read()) { ApTimeLine t = ApTimeLine.Mapper(reader); timeline.Add(t); } return(timeline); }
public IList <ApTimeLine> GetTimelines(int idchamp) { MySqlCommand cmd = new MySqlCommand("get_timelines_pChampion", connection); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new MySqlParameter("pIdChampion", idchamp)); var reader = cmd.ExecuteReader(); IList <ApTimeLine> timeline = new List <ApTimeLine>(); while (reader.Read()) { ApTimeLine t = ApTimeLine.Mapper(reader); timeline.Add(t); } return(timeline); }