Example #1
0
 public List <Chat> GetChatBySql(string sql)
 {
     using (SqlDataReader sdr = DBHelper.GetReader(sql))
     {
         List <Chat> list = new List <Chat>();
         while (sdr.Read())
         {
             Chat chat = new Chat(sdr);
             SqlVisitSessionProvider vs = new SqlVisitSessionProvider();
             chat.Vs = vs.GetSessionById(chat.ChatId);
             list.Add(chat);
         }
         return(list);
     }
 }
Example #2
0
 public List<Chat> GetChatBySql(string sql)
 {
     using (SqlDataReader sdr = DBHelper.GetReader(sql))
     {
         List<Chat> list = new List<Chat>();
         while (sdr.Read())
         {
             Chat chat = new Chat(sdr);
             SqlVisitSessionProvider vs = new SqlVisitSessionProvider();
             chat.Vs = vs.GetSessionById(chat.ChatId);
             list.Add(chat);
         }
         return list;
     }
 }