public List <XElement> GetGameRoomsByGameMode(int modeVal) { List <XElement> toRet = new List <XElement>(); try { using (connectionsLinqDataContext db = new connectionsLinqDataContext()) { var temp = db.GetGameRoomsByGameMode(modeVal).ToList(); foreach (var v in temp) { toRet.Add(v.GameXML); } return(toRet); } } catch (Exception e) { return(null); } }