public GamePlayer(string deviceName, UdpClient client, IPEndPoint endPoint) { using (Database.GameServer gameDb = new Database.GameServer("Data Source=(local);Initial Catalog=gameserver;Persist Security Info=True;User ID=sa;Password=ce-86944")) { var device = (from gameDevice in gameDb.GameDevices where gameDevice.Device == deviceName select gameDevice).First(); _device = device; _client = client; _endPoint = endPoint; } }