Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }