public bool UpdateGameRoom(int roomId, int gameId, XElement newXML, bool newIsActive, string newRep) { try { using (connectionsLinqDataContext db = new connectionsLinqDataContext()) { string oldRep = db.GetGameRoomReplyById(roomId).First().Replay; db.UpdateGameRoom(roomId, gameId, newXML, newIsActive, string.Concat(oldRep, newRep)); return(true); } } catch (Exception e) { return(false); } }
public string GetGameRoomReplyById(int roomid) { try { using (connectionsLinqDataContext db = new connectionsLinqDataContext()) { var temp = db.GetGameRoomReplyById(roomid).ToList(); if (temp.Capacity == 0) { return(null); } var res = temp.First(); return(res.Replay); } } catch (Exception e) { return(null); } }